HashiCorp Terraform Associate 003 Practice Test - Questions Answers, Page 10
List of questions
Related questions
Question 91

What feature stops multiple users from operating on the Terraform state at the same time?
Explanation:
State locking prevents other users from modifying the state file while a Terraform operation is in progress.This prevents conflicts and data loss1.
Question 92

Which of the following is not a valid siring function in Terraform?
Explanation:
This is not a valid string function in Terraform.The other options are valid string functions that can manipulate strings in various ways2.
Question 93

Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
Explanation:
Module variable assignments are not inherited from the parent module and you need to explicitly set them using thesourceargument. This allows you to customize the behavior of each module instance.
Question 94

What are some benefits of using Sentinel with Terraform Cloud/Terra form Cloud? Choose three correct answers.
Explanation:
These are some of the benefits of using Sentinel with Terraform Cloud/Terraform Enterprise, as they allow you to implement logic-based policies that can access and evaluate the Terraform plan, state, and configuration. The other options are not true, as Sentinel does not manage cloud access keys, and Sentinel policies are written in Sentinel language, not HCL.
Question 95

What does Terraform not reference when running a terraform apply -refresh-only ?
Explanation:
When running aterraform apply -refresh-only, Terraform does not reference the configuration files, but only the state file, credentials, and cloud provider.The purpose of this command is to update the state file with the current status of the real resources, without making any changes to them1.
Question 96

Which of the following is not a valid Terraform variable type?
Explanation:
This is not a valid Terraform variable type.The other options are valid variable types that can store different kinds of values2.
Question 97

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.
Which command will migrate your current state file to the new S3 remote backend?
Explanation:
This command will initialize the new backend and prompt you to migrate the existing state file to the new location3. The other commands are not relevant for this task.
Question 98

Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?
Explanation:
This is not a valid backend for Terraform, as it does not support locking or versioning of state files4. The other options are valid backends that can store state files in a central location.
Question 99

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?
Explanation:
This is a quick way to inspect the state file and find the information you need without modifying anything5. The other options are either incorrect or inefficient.
Question 100

As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?
Explanation:
This command will upgrade the plugins to the latest acceptable version within the version constraints specified in the configuration. The other commands do not have an-upgradeoption.
Question