Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 267


Which of the following is not considered a safe way to inject sensitive values into a Terraform Cloud workspace?

Show Answer
Correct Answer: A

Editing the state file directly before running terraform apply is not considered a safe way to inject sensitive values into a Terraform Cloud workspace. Modifying the state file directly can lead to corruption and unpredictable behavior in your infrastructure management. Using the -var flag on the command line or specifying a variable file with the -var-file flag are more controlled and conventional methods of injecting values.

Discussion

3 comments
Sign in to comment
AWS_cert2023Option: C
Jun 22, 2023

The answer C. A is wrong for Terraform state, don't recommend to edit state file.

DevoteamAnalytix
Jun 26, 2023

I agree, A is nonsense and B is a favored way, so C is the bad one

VSMuOption: A
Jul 21, 2023

Choosing A as it is not right way to do it. Even though C is not preferred, I think you can do it as you are supplying it as a parameter during run and the file is local to the operator running the command and hence can delete it after that. Since we are talking about state being stored remotely, it works very much similar to option B.

ShakDaddy
Jul 31, 2023

A is not possible at all. The question is regarding which is “NOT” the safe way. By interpretation meaning possible but not recommended. The answer is suggests C.

biprodattaOption: C
Jul 15, 2023

putting sensitive information in file and using that file whole terraform run is not a safe way !