Discount Offer
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99



Pass exam with Dumps4free or we will provide you with three additional months of access for FREE.

Terraform-Associate-003 Practice Test


Page 3 out of 39 Pages

Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.


A. Lets you version, reuse, and share infrastructure configuration


B. Provisions the same resources at a lower cost


C. Secures your credentials


D. Reduces risk of operator error


E. Prevents manual modifications to your resources





A.
  Lets you version, reuse, and share infrastructure configuration

D.
  Reduces risk of operator error

Explanation: It lets you version, reuse, and share infrastructure configuration as code files, which can be stored in a source control system and integrated with your CI/CD pipeline.
It reduces risk of operator error by automating repetitive tasks and ensuring consistency across environments. IaC does not necessarily provision resources at a lower cost, secure your credentials, or prevent manual modifications to your resources - these depend on other factors such as your cloud provider, your security practices, and your access policies.

When do you need to explicitly execute Terraform in refresh-only mode?


A. Before every terraform plan.


B. Before every terraform apply.


C. Before every terraform import.


D. None of the above.





C.
  Before every terraform import.

Explanation:
Purpose of Refresh-Only Mode: Running Terraform in refresh-only mode updates Terraform's state file with the current state of resources in your infrastructure without making changes to the resources themselves.
Context of Terraform Import: When using terraform import, you’re adding existing resources to the state file, and running Terraform in refresh-only mode before this operation can ensure that any initial configuration syncs precisely with the actual state.
For more on refresh-only mode in relation to terraform import, refer to Terraform's import documentation.

In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.


A. True


B. False





A.
  True

Explanation:
Speculative Plans: Terraform Cloud’s speculative plan feature runs automatically when changes are detected in a linked VCS repository, enabling users to review potential infrastructure changes without committing them.
Automatic Integration: This feature automates the planning process by triggering when changes are committed, aiding teams in previewing infrastructure changes seamlessly.
For further understanding, see the Terraform Cloud VCS Integration documentation.

Which Terraform command checks that your configuration syntax is correct?


A. terraform validate


B. terraform init


C. terraform show


D. terraform fmt





A.
  terraform validate

Explanation: The terraform validate command is used to check that your Terraform configuration files are syntactically valid and internally consistent. It is a useful command for ensuring your Terraform code is error-free before applying any changes to your infrastructure.

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:



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


A. Change the reference value to my-network,outputs,vmet_id


B. Define the attribute vmet_id as a variable in the networking modeule


C. Define the attribute vnet_id as an output in the networking module


D. Change the reference value module.my,network,outputs,vnet_id





C.
  Define the attribute vnet_id as an output in the networking module

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 named vnet_id, which causes the reference to fail.


Page 3 out of 39 Pages
Previous