Free Terraform Associate Exam Braindumps (page: 18)

Page 17 of 113

When running the command terraform taint against a managed resource you want to force recreation upon, Terraform will immediately destroy and recreate the resource.

  1. True
  2. False

Answer(s): B

Explanation:

"The terraform taint command informs Terraform that a particular object has become degraded or damaged. Terraform represents this by marking the object as "tainted" in the Terraform state, and Terraform will propose to replace it in the next plan you create." FYI - This command is deprecated. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply instead. For Terraform v0.15.2 and later, we recommend using the -replace option with terraform apply to force Terraform to replace an object even though there are no configuration changes that would require it.


Reference:

https://www.terraform.io/cli/commands/taint



All standard backend types support state storage, locking, and remote operations like plan. apply and destroy.

  1. True
  2. False

Answer(s): B

Explanation:

"Some of these backends act like plain remote disks for state files, while others support locking the state while operations are being performed. This helps prevent conflicts and inconsistencies. The built-in backends listed are the only backends. You cannot load additional backends as plugins."


Reference:

https://www.terraform.io/language/settings/backends/configuration



How can terraform plan aid in the development process?

  1. Validates your expectations against the execution plan without permanently modifying state
  2. Initializes your working directory containing your Terraform configuration files
  3. Formats your Terraform configuration files
  4. Reconciles Terraform’s state against deployed resources and permanently modifies state using the current status of deployed resources

Answer(s): A

Explanation:

"The terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure. By default, when Terraform creates a plan it:
Reads the current state of any already-existing remote objects to make sure that the Terraform state is up-to-date.
Compares the current configuration to the prior state and noting any differences.
Proposes a set of change actions that should, if applied, make the remote objects match the configuration."
"The plan command alone will not actually carry out the proposed changes, and so you can use this command to check whether the proposed changes match what you expected before you apply the changes or share your changes with your team for broader review.
If Terraform detects that no changes are needed to resource instances or to root module output values, terraform plan will report that no actions need to be taken."


Reference:

https://www.terraform.io/cli/commands/plan



You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each.
Which command would you use?

  1. terraform import
  2. terraform workspace
  3. terraform state
  4. terraform init

Answer(s): B


Reference:

https://www.terraform.io/language/state/workspaces#when-to-use-multiple-workspaces






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

Terraform Associate Discussions & Posts