Terraform-Associate-003 Dumps

Terraform-Associate-003 Free Practice Test

HashiCorp Terraform-Associate-003: HashiCorp Certified: Terraform Associate (003)

QUESTION 31

Which backend does the Terraform CU use by default?

Correct Answer: E
This is the backend that the Terraform CLI uses by default, unless you specify a different backend in your configuration. The local backend stores the state file in a local file named terraform.tfstate, which can be used to track and manage the state of your infrastructure.

QUESTION 32

Terraform variable names are saved in the state file.

Correct Answer: B
Terraform variable names are not saved in the state file, only their values are. The state file only stores the attributes of the resources and data sources that are managed by Terraform, not the variables that are used to configure them.

QUESTION 33

You can reference a resource created with for_each using a Splat ( *) expression.

Correct Answer: B
You cannot reference a resource created with for_each using a splat (*) expression, as it will not work with resources that have non-numeric keys. You need to use a for expression instead to iterate over the resource instances.

QUESTION 34

What is a key benefit of the Terraform state file?

Correct Answer: B
This is a key benefit of the Terraform state file, as it stores and tracks the metadata and attributes of the resources that are managed by Terraform, and allows Terraform to compare the current state with the desired state expressed by your configuration files.

QUESTION 35

Define the purpose of state in Terraform.

Correct Answer: A
The purpose of state in Terraform is to keep track of the real-world resources managed by Terraform, mapping them to the configuration. The state file contains metadata about these resources, such as resource IDs and other important attributes, which Terraform uses to plan and manage infrastructure changes. The state enables Terraform to know what resources are managed by which configurations and helps in maintaining the desired state of the infrastructure.References = This role of state in Terraform is outlined in Terraform's official documentation, emphasizing its function in mapping configuration to real-world resources and storing vital metadata .