exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 301 discussion

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

What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

  • A. terraform plan -refresh-only
  • B. terraform show -json
  • C. terraform apply -lock-false
  • D. terraform plan -target-state
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Stargazer11
Highly Voted 1 year, 3 months ago
Neither one of them is correct. Should be terraform apply -refresh-only
upvoted 9 times
...
090200f
Most Recent 7 months, 1 week ago
Selected Answer: A
option A is correct
upvoted 1 times
...
[Removed]
1 year, 2 months ago
Selected Answer: A
A - terraform plan -refresh-only
upvoted 4 times
...
dev_maftuna
1 year, 3 months ago
A. terraform plan -refresh-only
upvoted 1 times
...
dev_maftuna
1 year, 3 months ago
A. The -refresh-only flag with the terraform plan command updates the state file with the current state of the real resources, without applying any changes. This command compares the current state of the infrastructure with the Terraform configuration and updates the state file with any changes that were made externally.
upvoted 3 times
...
kareem_ashraf
1 year, 3 months ago
non is correct , some thing maybe wrong with this question , should be terraform refresh i think
upvoted 1 times
Mattt
5 months, 4 weeks ago
terraform apply -refresh-only
upvoted 1 times
...
...
vindi135
1 year, 3 months ago
Selected Answer: A
A. is the closest answer but not quite the right command that would make the changes to the state file. Its terraform apply -refresh-only
upvoted 2 times
...
petersoliman
1 year, 3 months ago
Selected Answer: A
A is the correct answer
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago