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 70 discussion

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

You're building a CI/CD (continuous integration/ continuous delivery) pipeline and need to inject sensitive variables into your Terraform run.
How can you do this safely?

  • A. Pass variables to Terraform with a ג€"var flag
  • B. Copy the sensitive variables into your Terraform code
  • C. Store the sensitive variables in a secure_vars.tf file
  • D. Store the sensitive variables as plain text in a source code repository
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
Bere
Highly Voted 1 year, 3 months ago
Selected Answer: A
The safest method to inject sensitive variables into your Terraform run in a CI/CD pipeline is: A. Pass variables to Terraform with a -var flag. When running Terraform in your CI/CD pipeline, you would pass the sensitive variables like this: terraform apply -var="database_password=mysecretpassword" -var="api_key=1234567890abcdef" For enhanced security, in a CI/CD environment, you'd typically use environment variables or secret management tools that are supported by your CI/CD platform to pass these sensitive values, so they are never exposed in logs or stored in insecure locations. For instance, using environment variables: export TF_VAR_database_password=mysecretpassword export TF_VAR_api_key=1234567890abcdef terraform apply
upvoted 12 times
...
rfd
Highly Voted 2 years, 5 months ago
Selected Answer: A
Definitely A.
upvoted 7 times
...
akki_0108
Most Recent 2 months ago
Selected Answer: A
A is Correct for passing sensitive vars to CI/CD
upvoted 1 times
...
samimshaikh
10 months, 4 weeks ago
Selected Answer: A
The safest option among the choices provided is to use the -var flag to pass sensitive variables to Terraform. This allows you to provide variable values at runtime without hardcoding them directly into the Terraform code or exposing them in the source code repository.
upvoted 5 times
...
Tlakmini
1 year, 3 months ago
Selected Answer: A
https://developer.hashicorp.com/terraform/language/values/variables
upvoted 2 times
...
cloudznj
1 year, 4 months ago
I see that is A but since its on B. Will it be B on the exam? Or that option, even though everyone is on A. Just curious.
upvoted 1 times
LunarPhobia
1 year, 3 months ago
The answers on here aren't always correct. Typically go with the highest rated one
upvoted 2 times
...
...
Faaizz
1 year, 7 months ago
Selected Answer: A
Obviously A
upvoted 2 times
...
camps
1 year, 7 months ago
Selected Answer: A
A. Pass variables to Terraform with a "var" flag. When running Terraform in a CI/CD pipeline, it is important to securely pass sensitive variables to Terraform. One way to pass sensitive variables to Terraform is to use the -var flag to supply the value of the variable at runtime.
upvoted 3 times
...
Power123
1 year, 7 months ago
A is correct
upvoted 1 times
...
thor7
1 year, 7 months ago
Selected Answer: A
A is a correct answer Reference: https://developer.hashicorp.com/terraform/language/values/variables
upvoted 1 times
...
eduvar4
2 years, 1 month ago
Selected Answer: A
https://developer.hashicorp.com/terraform/language/values/variables
upvoted 1 times
...
tf_user
2 years, 2 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
Tomcrui1234589
2 years, 3 months ago
A for sure
upvoted 1 times
...
Ahmad_Terraform
2 years, 4 months ago
A= correct Var
upvoted 1 times
...
Eltooth
2 years, 4 months ago
Selected Answer: A
A is correct answer : -var See Topic 1 # Question 43 https://blog.gruntwork.io/a-comprehensive-guide-to-managing-secrets-in-your-terraform-code-1d586955ace1
upvoted 3 times
...
bp339
2 years, 5 months ago
Selected Answer: A
A is the answer
upvoted 2 times
...
biscuithammer
2 years, 6 months ago
Selected Answer: A
I vote A
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 ...