ExamGecko
Home / HashiCorp / Terraform Associate 003 / List of questions
Ask Question

HashiCorp Terraform Associate 003 Practice Test - Questions Answers, Page 5

Add to Whishlist

List of questions

Question 41

Report Export Collapse

What type of block is used to construct a collection of nested configuration blocks?

Dynamic
Dynamic
For_each
For_each
Nesting
Nesting
repeated.
repeated.
Suggested answer: A
Explanation:

This is the type of block that is used to construct a collection of nested configuration blocks, by using afor_eachargument to iterate over a collection value and generate a nested block for each element. For example, you can use a dynamic block to create multiple ingress rules for a security group resource.

asked 18/09/2024
Meghan Crofford
42 questions

Question 42

Report Export Collapse

You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:

HashiCorp Terraform Associate 003 image Question 42 30480 09182024192049000000

When you run terraform validate, you get the following error:

HashiCorp Terraform Associate 003 image Question 42 30480 09182024192049000000

What must you do to successfully retrieve this value from your networking module?

Change the reference value to my-network,outputs,vmet_id
Change the reference value to my-network,outputs,vmet_id
Define the attribute vmet_id as a variable in the networking modeule
Define the attribute vmet_id as a variable in the networking modeule
Define the attribute vnet_id as an output in the networking module
Define the attribute vnet_id as an output in the networking module
Change the reference value module.my,network,outputs,vnet_id
Change the reference value module.my,network,outputs,vnet_id
Suggested answer: C
Explanation:

This is what you must do to successfully retrieve this value from your networking module, as it will expose the attribute as an output value that can be referenced by other modules or resources. The error message indicates that the networking module does not have an output value namedvnet_id, which causes the reference to fail.

asked 18/09/2024
EVA LITA
44 questions

Question 43

Report Export Collapse

Where does the Terraform local backend store its state?

In the terraform file
In the terraform file
In the /tmp directory
In the /tmp directory
In the terraform,tfstate file
In the terraform,tfstate file
In the user's terraform,state file
In the user's terraform,state file
Suggested answer: C
Explanation:

This is where the Terraform local backend stores its state, by default, unless you specify a different file name or location in your configuration. The local backend is the simplest backend type that stores the state file on your local disk.

asked 18/09/2024
steven Hughes
42 questions

Question 44

Report Export Collapse

Where can Terraform not load a provider from?

Plugins directory
Plugins directory
Provider plugin chance
Provider plugin chance
Official HashCrop Distribution on releases.hashcrop.com
Official HashCrop Distribution on releases.hashcrop.com
Source code
Source code
Suggested answer: D
Explanation:

This is where Terraform cannot load a provider from, as it requires a compiled binary file that implements the provider protocol. You can load a provider from a plugins directory, a provider plugin cache, or the official HashiCorp distribution on releases.hashicorp.com.

asked 18/09/2024
Preety Koul
50 questions

Question 45

Report Export Collapse

You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

True
True
False
False
Suggested answer: B
Explanation:

The execution plan forterraform applywill not be the same as the one you ran locally withterraform plan, if your teammate manually modified the infrastructure component you are working on. This is because Terraform will refresh the state file before applying any changes, and will detect any differences between the state and the real resources.

asked 18/09/2024
Andrea Di Giuseppe
41 questions

Question 46

Report Export Collapse

Which parameters does terraform import require? Choose two correct answers.

Become a Premium Member for full access
  Unlock Premium Member

Question 47

Report Export Collapse

In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

Become a Premium Member for full access
  Unlock Premium Member

Question 48

Report Export Collapse

A Terraform provider is NOT responsible for:

Become a Premium Member for full access
  Unlock Premium Member

Question 49

Report Export Collapse

When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Become a Premium Member for full access
  Unlock Premium Member

Question 50

Report Export Collapse

Terraform variable names are saved in the state file.

Become a Premium Member for full access
  Unlock Premium Member
Total 230 questions
Go to page: of 23