What command can you run to generate DOT (Document Template) formatted data to visualize Terraform dependencies?
A. terraform refresh B. terraform show C. terraform graph D. terraform output
C. terraform graph
Explanation
The terraform graph command is used to generate a visual representation of either a configuration or execution plan. The output is in the DOT format, which can be used by GraphViz to generate charts.
Question 142:
You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called\
You immediately run terraform apply but don't see any changes. Your state file didn't move. Which command will migrate your current state file to the new S3 remote backend?
A. terraform push B. terraform init C. terraform refresh D. terraform state
B. terraform init
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 143:
Terraform encrypts sensitive values stored in your state file.
A. True B. False
B. False
Explanation
Terraform state files are not automatically encrypted by default. Sensitive values are stored in plaintext within the state file. However, you can protect the state file by using remote backends that support encryption, such as AWS S3 with
server-side encryption enabled or Terraform Cloud, which offers encrypted state storage.
References:
Terraform State
Question 144:
When using Terraform in a team it is important for everyone to be working with the same state so that operations will be applied to the same remote objects. Which of the below option is a recommended solution for this?
A. Remote State B. Module C. Use the cached state and treat this as the record of truth. D. Workspace
A. Remote State
Explanation
https://www.terraform.io/docs/state/remote.html
Question 145:
All standard backend types support state storage, locking, and remote operations like plan. apply and destroy.
A. True B. False
B. False
Explanation
https://www.terraform.io/language/settings/backends/configuration "Some of these backends act like plain remote disks for state files, while others support locking the state while operations are being performed. This helps prevent conflicts and inconsistencies. The built-in backends listed are the only backends. You cannot load additional backends as plugins."
Question 146:
Which of the following is the safest way to inject sensitive values into a Terraform Cloud workspace?
A. Write the value to a file and specify the file with the-var-file flag B. Set a value for the variable in the UI and check the "Sensitive" check box C. Edit the state file directly just before running terraform apply D. Set the variable value on the command line with the-var flag
B. Set a value for the variable in the UI and check the "Sensitive" check box
Explanation
-var and-var-file overwrite workspace-specific and variable set variables that have the same key. From the workspace, variable can be added and checked off as being sensitive.
Which feature of Terraform allows multiple state files for a single configuration file depending upon the environment?
A. Terraform Modules B. Terraform Enterprise C. Terraform Workspaces D. Terraform Remote Backends
C. Terraform Workspaces
Explanation
Question 148:
You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?
A. After you run terraform apply so you can validate your infrastructure B. Before you run terraform apply so you can validate your provider credentials C. Before you run terraform plan so you can validate your code syntax D. After you run terraform plan so you can validate that your state file is consistent with your infrastructure
C. Before you run terraform plan so you can validate your code syntax
Explanation
This is the best time to run terraform validate, as it will check your code for syntax errors, typos, and missing arguments before you attempt to create a plan. The other options are either incorrect or unnecessary.
Question 149:
Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of state changes.
A. False B. True
B. True
Explanation
Terraform Cloud always encrypts state at rest and protects it with TLS in transit. Terraform Cloud also knows the identity of the user requesting state and maintains a history of state changes. This can be used to control access and track activity. Terraform Enterprise also supports detailed audit logging. https://www.terraform.io/docs/state/sensitive-data.html#recommendations
Question 150:
You have multiple developers working on a terraform project (using terraform OSS), and have saved the terraform state in a remote S3 bucket . However ,team is intermittently experiencing inconsistencies in the provisioned infrastructure / failure in the code . You have traced this problem to simultaneous/concurrent runs of terraform apply command for 2/more developers . What can you do to fix this problem?
A. Use terraform workspaces feature, this will fix this problem by default , as every developer will have their own state file , and terraform will merge them on server side on its own. B. Structure your team in such a way that only one individual will run terraform apply , everyone will just make changes and share with him. Then there will be no chance of any inconsistencies. C. Stop using remote state , and store the developer tfstate in their own machine . Once a day , all developers should sit together and merge the state files manually , to avoid any inconsistencies. D. Enable terraform state locking for the S3 backend using DynamoDB table. This prevents others from acquiring the lock and potentially corrupting your state.
D. Enable terraform state locking for the S3 backend using DynamoDB table. This prevents others from acquiring the lock and potentially corrupting your state.
Explanation
S3 backend support state locking using DynamoDB. https://www.terraform.io/docs/state/locking.html
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only HashiCorp exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your TERRAFORM-ASSOCIATE-003 exam preparations
and HashiCorp certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.