ExamGecko
Home Home / HashiCorp / Terraform Associate 003

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

Question list
Search
Search

Question 41

Report
Export
Collapse

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

A.
Dynamic
A.
Dynamic
Answers
B.
For_each
B.
For_each
Answers
C.
Nesting
C.
Nesting
Answers
D.
repeated.
D.
repeated.
Answers
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
39 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:

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

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

A.
Change the reference value to my-network,outputs,vmet_id
A.
Change the reference value to my-network,outputs,vmet_id
Answers
B.
Define the attribute vmet_id as a variable in the networking modeule
B.
Define the attribute vmet_id as a variable in the networking modeule
Answers
C.
Define the attribute vnet_id as an output in the networking module
C.
Define the attribute vnet_id as an output in the networking module
Answers
D.
Change the reference value module.my,network,outputs,vnet_id
D.
Change the reference value module.my,network,outputs,vnet_id
Answers
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
40 questions

Question 43

Report
Export
Collapse

Where does the Terraform local backend store its state?

A.
In the terraform file
A.
In the terraform file
Answers
B.
In the /tmp directory
B.
In the /tmp directory
Answers
C.
In the terraform,tfstate file
C.
In the terraform,tfstate file
Answers
D.
In the user's terraform,state file
D.
In the user's terraform,state file
Answers
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
37 questions

Question 44

Report
Export
Collapse

Where can Terraform not load a provider from?

A.
Plugins directory
A.
Plugins directory
Answers
B.
Provider plugin chance
B.
Provider plugin chance
Answers
C.
Official HashCrop Distribution on releases.hashcrop.com
C.
Official HashCrop Distribution on releases.hashcrop.com
Answers
D.
Source code
D.
Source code
Answers
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
39 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.

A.
True
A.
True
Answers
B.
False
B.
False
Answers
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
34 questions

Question 46

Report
Export
Collapse

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

A.
Provider
A.
Provider
Answers
B.
Resource ID
B.
Resource ID
Answers
C.
Resource address
C.
Resource address
Answers
D.
Path
D.
Path
Answers
Suggested answer: B, C

Explanation:

These are the parameters thatterraform importrequires, as they allow Terraform to identify the existing resource that you want to import into your state file, and match it with the corresponding configuration block in your files.

asked 18/09/2024
Jarlesi Bolivar
36 questions

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.

A.
True
A.
True
Answers
B.
False
B.
False
Answers
Suggested answer: A

Explanation:

When you use a remote backend that needs authentication, HashiCorp recommends that you:

asked 18/09/2024
JEAN-MARIE HERMANT
48 questions

Question 48

Report
Export
Collapse

A Terraform provider is NOT responsible for:

A.
Exposing resources and data sources based on an APUI
A.
Exposing resources and data sources based on an APUI
Answers
B.
Managing actions to take based on resources differences
B.
Managing actions to take based on resources differences
Answers
C.
Understanding API interactions with some service
C.
Understanding API interactions with some service
Answers
D.
Provisioning infrastructure in multiple
D.
Provisioning infrastructure in multiple
Answers
Suggested answer: D

Explanation:

This is not a responsibility of a Terraform provider, as it does not make sense grammatically or logically. A Terraform provider is responsible for exposing resources and data sources based on an API, managing actions to take based on resource differences, and understanding API interactions with some service.

asked 18/09/2024
nico farina
38 questions

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?

A.
Alias
A.
Alias
Answers
B.
Id
B.
Id
Answers
C.
Depends_on
C.
Depends_on
Answers
D.
name
D.
name
Answers
Suggested answer: A

Explanation:

This is the meta-argument that you must include in any non-default provider configurations, as it allows you to give a friendly name to the configuration and reference it in other parts of your code. The other options are either invalid or irrelevant for this purpose.

asked 18/09/2024
Eric De La Vega
41 questions

Question 50

Report
Export
Collapse

Terraform variable names are saved in the state file.

A.
True
A.
True
Answers
B.
False
B.
False
Answers
Suggested answer: B

Explanation:

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.

asked 18/09/2024
Yung-Shuen Chang
40 questions
Total 195 questions
Go to page: of 20