Free Terraform Associate Exam Braindumps (page: 13)

Page 12 of 113

Only the user that generated a plan may apply it.

  1. True
  2. False

Answer(s): B



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?

  1. aws_ami.ubuntu
  2. data.aws_ami.ubuntu
  3. data.aws_ami.ubuntu.id
  4. aws_ami.ubuntu.id

Answer(s): C

Explanation:

resource "aws_instance" "web" { ami = data.aws_ami.ubuntu.id


Reference:

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance



FILL BLANK
You need to specify a dependency manually.
What resource meta-parameter can you use to make sure Terraform respects the dependency?

Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

  1. depends_on

Answer(s): A


Reference:

https://www.terraform.io/docs/language/functions/file.html



You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM, perform terraform apply, and see that your VM was created successfully.
What should you do to delete the newly-created VM with Terraform?

  1. The Terraform state file contains all 16 VMs in the team account. Execute terraform destroy and select the newly-created VM.
  2. The Terraform state file only contains the one new VM. Execute terraform destroy.
  3. Delete the Terraform state file and execute Terraform apply.
  4. Delete the VM using the cloud provider console and terraform apply to apply the changes to the Terraform state file.

Answer(s): B

Explanation:

You develop a Terraform configuration containing one VM, perform terraform apply, and see that your VM was created successfully. read the question carefully "Terraform configuration containing one VM, perform terraform apply" so only one VM is in state file.






Post your Comments and Discuss HashiCorp Terraform Associate exam with other Community members:

Terraform Associate Discussions & Posts