Free Terraform Associate Exam Braindumps (page: 22)

Page 21 of 113

What features stops multiple admins from changing the Terraform state at the same time?

  1. Version control
  2. Backend types
  3. Provider constraints
  4. State locking

Answer(s): D

Explanation:

Somewhat ambiguous question however the key phrase is "feature". You need a remote backend first with a State Locking feature available to avoid this scenario.


Reference:

https://blog.gruntwork.io/how-to- manage-terraform-state-28f5697e68fa



A fellow developer on your team is asking for some help in refactoring their Terraform code. As part of their application’s architecture, they are going to tear down an existing deployment managed by Terraform and deploy new. However, there is a server resource named aws_instance.ubuntu[1] they would like to keep to perform some additional analysis.
What command should be used to tell Terraform to no longer manage the resource?

  1. terraform apply rm aws_instance.ubuntu[1]
  2. terraform state rm aws_instance.ubuntu[1]
  3. terraform plan rm aws_instance.ubuntu[1]
  4. terraform delete aws_instance.ubuntu[1]

Answer(s): B

Explanation:

"You can use terraform state rm in the less common situation where you wish to remove a binding to an existing remote object without first destroying it, which will effectively make Terraform "forget" the object while it continues to exist in the remote system." https://www.terraform.io/cli/commands/state/rm



Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

  1. True
  2. False

Answer(s): A

Explanation:

"Use the depends_on meta-argument to handle hidden resource or module dependencies that Terraform cannot automatically infer. You only need to explicitly specify a dependency when a resource or module relies on another resource's behavior but does not access any of that resource's data in its arguments."


Reference:

https://www.terraform.io/language/meta-arguments/depends_on



A terraform apply can not infrastructure.

  1. change
  2. destroy
  3. provision
  4. import

Answer(s): D


Reference:

https://www.educative.io/answers/what-is-the-command-to-destroy-infrastructure-in-terraform






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

Terraform Associate Discussions & Posts