Free TA-002-P Exam Dumps

Question 96

- (Exam Topic 1)
Examine the following Terraform configuration, which uses the data source for an AWS AMI. What value should you enter for the ami argument in the AWS instance resource?
TA-002-P dumps exhibit

Correct Answer:C
resource "aws_instance" "web" { ami= data.aws_ami.ubuntu.id
Reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance

Question 97

- (Exam Topic 4)
A user has created a module called "my_test_module" and committed it to GitHub. Over time, several commits have been made with updates to the module, each tagged in GitHub with an incremental version number. Which of the following lines would be required in a module configuration block in terraform to select tagged version v1.0.4?

Correct Answer:D
https://www.terraform.io/docs/modules/sources.html#selecting-a-revision

Question 98

- (Exam Topic 4)
Which of the following is a meta-argument defined in the configuration files of Terraform?

Correct Answer:B

Question 99

- (Exam Topic 2)
What is the purpose of using the local-exec provisioner? (Select Two)

Correct Answer:AC
The local-exec provisioner invokes a local executable after a resource is created. This invokes a process on the machine running Terraform, not on the resource.
Note that even though the resource will be fully created when the provisioner is run, there is no guarantee that it will be in an operable state - for example system services such as sshd may not be started yet on compute resources.
Example usage
resource "aws_instance" "web" {
# ...
provisioner "local-exec" {
command = "echo ${aws_instance.web.private_ip} >> private_ips.txt"
}
}
Note: Provisioners should only be used as a last resort. For most common situations there are better alternatives.
https://www.terraform.io/docs/provisioners/local-exec.html

Question 100

- (Exam Topic 2)
How can you ensure that the engineering team who has access to git repo will not create any non-compliant resources that might lead to a security audit failure in future. your team is using Hashicorp Terraform Enterprise Edition.

Correct Answer:C
https://www.terraform.io/docs/cloud/sentinel/index.html