Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 267 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 267
Topic #: 1
[All Terraform Associate Questions]

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

  • A. Edit the state file directly just before running terraform apply
  • B. Set the variable value on the command line with the -var flag
  • C. Write the value to a file and specify the file with the -var-file flag
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
VSMu
Highly Voted 1 year, 4 months ago
Selected Answer: A
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.
upvoted 5 times
ShakDaddy
1 year, 3 months ago
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.
upvoted 2 times
...
...
sco_murad
Most Recent 1 month ago
Selected Answer: A
no direct state file modification!
upvoted 1 times
...
bora4motion
3 months, 1 week ago
Selected Answer: C
C makes more sens than A.
upvoted 1 times
...
nmnm22
3 months, 2 weeks ago
Selected Answer: C
A doesnt even make sense given our context, this is a question about sensitive data, nothing to do with corrupted state files
upvoted 1 times
...
090200f
3 months, 2 weeks ago
Selected Answer: C
even I think C is more sense to me, https://developer.hashicorp.com/terraform/tutorials/configuration-language/sensitive-variables
upvoted 1 times
...
biprodatta
1 year, 4 months ago
Selected Answer: C
putting sensitive information in file and using that file whole terraform run is not a safe way !
upvoted 2 times
...
AWS_cert2023
1 year, 5 months ago
The answer C. A is wrong for Terraform state, don't recommend to edit state file.
upvoted 3 times
DevoteamAnalytix
1 year, 4 months ago
I agree, A is nonsense and B is a favored way, so C is the bad one
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...