What feature stops multiple users from operating on the Terraform state at the same time?
Answer(s): A
State locking prevents other users from modifying the state file while a Terraform operation is in progress. This prevents conflicts and data loss1.
Which of the following is not a valid string function in Terraform?
Answer(s): C
Referencing Terraform Built-in Functions:chomp: removes trailing newlines join: combines list into string split: splits string into list slice:is nota valid Terraform string function (it's used in other languages like Python)
What does the default "local" Terraform backend store?
Answer(s): B
The default "local" Terraform backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure3.
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
This will trigger a run in the Terraform Cloud workspace, which will perform a plan and apply operation on the infrastructure defined by the Terraform configuration files in the VCS repository.
You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
Answer(s): D
This is a secure way to inject sensitive variables into your Terraform run, as they will not be stored in any file or source code repository. You can also use environment variables or variable files with encryption to pass sensitive variables to Terraform.
Post your Comments and Discuss HashiCorp Terraform Associate 004 exam prep with other Community members: