Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam VA-002-P Topic 2 Question 74 Discussion

Actual exam question for HashiCorp's VA-002-P exam
Question #: 74
Topic #: 2
[All VA-002-P Questions]

Environment variables can be used to set variables. The environment variables must be in the format "____"_. Select the correct prefix string from the following list.

Show Suggested Answer Hide Answer
Suggested Answer: A

Environment variables can be used to set variables. The environment variables must be in the format TF_VAR_name and this will be checked last for a value. For example:

export TF_VAR_region=us-west-1

export TF_VAR_ami=ami-049d8641

export TF_VAR_alist='[1,2,3]'

export TF_VAR_amap='{ foo = 'bar', baz = 'qux' }'

https://www.terraform.io/docs/commands/environment-variables.html


Contribute your Thoughts:

Kristel
4 days ago
Nah, I don't think 'TF_ENV_VAR' is the right answer here. That just sounds a bit too specific, you know? 'TF_VAR' is the standard, and that's what I'm going with.
upvoted 0 times
...
Leanora
5 days ago
Hmm, I'm not so sure about that. What about 'TF_ENV_VAR'? Doesn't that also sound like it could be a valid option? I mean, it's specifically for environment variables, right?
upvoted 0 times
...
Ryann
6 days ago
Yeah, I agree with Marla. 'TF_VAR' is the way to go. It's the standard format that Terraform expects for environment variables. If you try to use anything else, it's just not gonna work.
upvoted 0 times
...
Marla
7 days ago
Ooh, I've seen this question before! It's all about those tricky environment variables. Let's see, the correct prefix has to be 'TF_VAR', right? That's the one that Terraform uses to set variables.
upvoted 0 times
...

Save Cancel