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

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

Terraform variables and outputs that set the "description" argument will store that description in the state file.

  • A. True
  • B. False
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
SilentMilli
Highly Voted 1 year, 8 months ago
Selected Answer: B
Terraform variables and outputs that set the "description" argument are not stored in the state file. The "description" argument is used to provide a human-readable description of the variable or output, and it is intended to be used as documentation for other users of the Terraform code. The state file is used to store the current state of the infrastructure managed by Terraform, including the values of variables and outputs. However, the "description" argument is not part of the state file, and it is not used by Terraform to manage the infrastructure. Instead, it is only used as metadata to describe the variable or output.
upvoted 19 times
...
antivrillee
Highly Voted 2 years, 2 months ago
Selected Answer: B
Answer is B. Descriptions aren't stored in the state file.
upvoted 11 times
...
Bere
Most Recent 1 month, 4 weeks ago
Selected Answer: B
1) Create the following Terraform configuration: provider "aws" { region = "eu-west-1" } variable "instance_type" { description = "The type of instance to create" default = "t2.micro" } resource "aws_instance" "example" { ami = "ami-096800910c1b781ba" # Replace this with an appropriate AMI ID for your region instance_type = var.instance_type } output "instance_id" { description = "The ID of the created instance" value = aws_instance.example.id } 2) After you run terraform apply on this configuration, the state file (terraform.tfstate) will include the value of the instance_type variable ("t2.micro") and the value of the instance_id output (which would be the ID of the created AWS instance), but it would not include the descriptions of either the variable or the output.
upvoted 9 times
...
starkonbullet
6 months, 1 week ago
Selected Answer: B
Validated; it would just show type, value in the terraform state.
upvoted 2 times
...
mamtak_2008
9 months, 3 weeks ago
A. True Terraform variables and outputs that set the "description" argument will indeed store that description in the state file. This allows for better documentation and understanding of the purpose of variables and outputs within the Terraform configuration. However, it's important to note that sensitive information should not be included in descriptions as the state file is stored in plain text and could potentially expose sensitive information if not handled properly.
upvoted 1 times
Lashe
3 months, 2 weeks ago
not true. Terraform state file only stores the actual infrastructure resources and their state
upvoted 1 times
...
...
samimshaikh
10 months, 4 weeks ago
Selected Answer: B
Terraform state files are intended to store the actual configuration and state of the infrastructure, focusing on information that is necessary for Terraform to understand and manage the resources. Descriptions, being informational and not affecting the infrastructure's configuration or behavior, are typically not included in the state file to keep it concise and focused on essential details for Terraform's management.
upvoted 3 times
...
guicane
12 months ago
Selected Answer: B
I don't understand how such a simple question can show the wrong answer by the website.
upvoted 1 times
...
luke404
1 year ago
Selected Answer: B
simply check the output of "terraform state pull" or see inside the tfstate file if using local state, there are no descriptions stored in the state
upvoted 1 times
...
Mimi666
1 year, 1 month ago
Selected Answer: B
variables are not stored in state
upvoted 1 times
...
Badii
1 year, 2 months ago
Selected Answer: B
Answer is B
upvoted 1 times
...
Jayanth
1 year, 3 months ago
B. False
upvoted 1 times
...
Busi57
1 year, 4 months ago
Selected Answer: B
i think B
upvoted 1 times
...
Shane_C
1 year, 4 months ago
Selected Answer: B
B is correct
upvoted 1 times
...
SIAMIANJI
1 year, 5 months ago
Selected Answer: B
The correct answer is B.
upvoted 2 times
...
Power123
1 year, 7 months ago
Correct Ans is B
upvoted 1 times
...
Mal_8
1 year, 9 months ago
Selected Answer: B
The answer is B. Descriptions aren't stored in the state file.
upvoted 1 times
...
Only5
1 year, 9 months ago
Answer is A, I can see description in state file on my environment
upvoted 1 times
guicane
12 months ago
no you cannot
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 ...