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

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

List of questions

Question 51

Report Export Collapse

What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

Terraform plan --refresh-only
Terraform plan --refresh-only
Terraform show --json
Terraform show --json
Terraform apply --lock-false
Terraform apply --lock-false
Terraform plan target-state
Terraform plan target-state
Suggested answer: A
Explanation:

This is the command that always causes a state file to be updated with changes that might have been made outside of Terraform, as it will only refresh the state file with the current status of the real resources, without making any changes to them or creating a plan.

asked 18/09/2024
Mark Hughes
35 questions

Question 52

Report Export Collapse

You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?

Set verbose for each provider in your Terraform configuration
Set verbose for each provider in your Terraform configuration
Set the environment variable TF_LOG_TRACE
Set the environment variable TF_LOG_TRACE
Set the environment variable TF_LOG_PATH
Set the environment variable TF_LOG_PATH
Set the environment variable TF_log_TRACE
Set the environment variable TF_log_TRACE
Suggested answer: B
Explanation:

This will enable additional logging messages to find out from which paths Terraform is loading providers referenced in your Terraform configuration files, as it will set the log level toTRACE, which is the most verbose and detailed level.

asked 18/09/2024
Andrew Naftel
39 questions

Question 53

Report Export Collapse

Which of the following is not a valid Terraform collection type?

Tree
Tree
Map
Map
List
List
set
set
Suggested answer: A
Explanation:

This is not a valid Terraform collection type, as Terraform only supports three collection types: list, map, and set. A tree is a data structure that consists of nodes with parent-child relationships, which is not supported by Terraform.

asked 18/09/2024
Gerson Rodrigo Menendez
43 questions

Question 54

Report Export Collapse

What does state looking accomplish?

Prevent accidental Prevent accident deletion of the state file
Prevent accidental Prevent accident deletion of the state file
Blocks Terraform commands from modifying, the state file
Blocks Terraform commands from modifying, the state file
Copies the state file from memory to disk
Copies the state file from memory to disk
Encrypts any credentials stored within the state file
Encrypts any credentials stored within the state file
Suggested answer: B
Explanation:

This is what state locking accomplishes, by preventing other users from modifying the state file while a Terraform operation is in progress. This prevents conflicts and data loss.

asked 18/09/2024
Sari Bukhari
37 questions

Question 55

Report Export Collapse

What does this code do?

HashiCorp Terraform Associate 003 image Question 55 30493 09182024192049000000

Requires any version of the AWS provider > = 3.0 and <4.0
Requires any version of the AWS provider > = 3.0 and <4.0
Requires any version of the AWS provider >= 3.0
Requires any version of the AWS provider >= 3.0
Requires any version of the AWS provider > = 3.0 major release. like 4.1
Requires any version of the AWS provider > = 3.0 major release. like 4.1
Requires any version of the AWS provider > 3.0
Requires any version of the AWS provider > 3.0
Suggested answer: A
Explanation:

This is what this code does, by using the pessimistic constraint operator (~>), which specifies an acceptable range of versions for a provider or module.

asked 18/09/2024
Rui Afonso
38 questions

Question 56

Report Export Collapse

Only the user that generated a plan may apply it.

True
True
False
False
Suggested answer: B
Explanation:

Any user with permission to apply a plan can apply it, not only the user that generated it. This allows for collaboration and delegation of tasks among team members.

asked 18/09/2024
B M
34 questions

Question 57

Report Export Collapse

You cannot install third party plugins using terraform init.

True
True
False
False
Suggested answer: B
Explanation:

You can install third party plugins usingterraform init, as long as you specify the plugin directory in your configuration or as a command-line argument. You can also use theterraform providers mirrorcommand to create a local mirror of providers from any source.

asked 18/09/2024
Nigel Choji
48 questions

Question 58

Report Export Collapse

Which of these ate features of Terraform Cloud? Choose two correct answers.

Automated infrastructure deployment visualization
Automated infrastructure deployment visualization
Automatic backups
Automatic backups
A web-based user interface (Ul)
A web-based user interface (Ul)
Remote state storage
Remote state storage
Suggested answer: C, D
Explanation:

These are features of Terraform Cloud, which is a hosted service that provides a web-based UI, remote state storage, remote operations, collaboration features, and more for managing your Terraform infrastructure.

asked 18/09/2024
Roman Flores
37 questions

Question 59

Report Export Collapse

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.

True
True
False
False
Suggested answer: A
Explanation:

Setting theTF_LOGenvironment variable toDEBUGcauses debug messages to be logged into stdout, along with other log levels such asTRACE,INFO,WARN, andERROR. This can be useful for troubleshooting or debugging purposes.

asked 18/09/2024
Francis Sailer
49 questions

Question 60

Report Export Collapse

How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

It can execute Terraform runs on dedicated infrastructure in Terraform Cloud
It can execute Terraform runs on dedicated infrastructure in Terraform Cloud
It doesn't show the output of a terraform apply locally
It doesn't show the output of a terraform apply locally
It is only arable lo paying customers
It is only arable lo paying customers
All of the above
All of the above
Suggested answer: A
Explanation:

This is how the Terraform Cloud integration differs from other state backends such as S3, Consul, etc., as it allows you to perform remote operations on Terraform Cloud's servers instead of your local machine. The other options are either incorrect or irrelevant.

asked 18/09/2024
BurtAnderson Carter
37 questions
Total 195 questions
Go to page: of 20