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

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

When does terraform apply reflect changes in the cloud environment?

  • A. Immediately
  • B. However long it takes the resource provider to fulfill the request
  • C. After updating the state file
  • D. Based on the value provided to the -refresh command line argument
  • E. None of the above
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
Nunyabiznes
Highly Voted 1 year, 8 months ago
Selected Answer: B
When you execute terraform apply, Terraform creates a new execution plan by comparing the current state file to the desired state declared in the configuration. After creating the execution plan, Terraform presents the proposed changes and asks for confirmation to apply them. Once you confirm the changes, Terraform updates the state file with the new state reflecting the changes that were made. Terraform then submits the change requests to the resource provider to make the desired changes in the cloud environment. The amount of time it takes for the resource provider to fulfill the requests can vary depending on the resources being modified.
upvoted 16 times
liuyomz
7 months ago
yeah, B is not exactly correct, but the best one.
upvoted 2 times
...
...
vitasac
Highly Voted 2 years, 6 months ago
Selected Answer: B
B for sure
upvoted 11 times
...
foreverlearner
Most Recent 1 year, 4 months ago
From https://developer.hashicorp.com/terraform/tutorials/cli/apply When you apply this configuration, Terraform will: 1) Lock your project's state 2) Create a plan, and wait for you to approve it. 3) Execute the steps defined in the plan using the providers you installed when you initialized your configuration. Terraform executes steps in parallel when possible, and sequentially when one resource depends on another. 4) Update your project's state file with a snapshot of the current state of your resources. 5) Unlock the state file. 6) Print out a report of the changes it made, as well as any output values defined in your configuration. Changes in the cloud environment are made on step 3, before updating the state file
upvoted 6 times
...
zanhsieh
1 year, 6 months ago
Selected Answer: B
I vote for B. The difference between B and C is that we have to count on timeout cases in the real world, e.g. provision GCP DataProc cluster, MongoDB Atlas, etc. It's possible the provisioner timeout but the provider keeps going till the job finish. In this case the local terraform state file does not sync with the physical infra - terraform did try to update but timeout. Then we run `terraform apply` again and the state file reconciles with the physical infra.
upvoted 2 times
...
Ni33
1 year, 6 months ago
Selected Answer: B
BBBBBBBBBBB
upvoted 2 times
...
Power123
1 year, 7 months ago
B is the correct ans
upvoted 1 times
...
Chaks1985
1 year, 10 months ago
Ans: C ("WHEN" is key in this question. Its not asking how long will it take but "WHEN"
upvoted 2 times
...
InformationOverload
1 year, 10 months ago
Selected Answer: B
If you are creating a new virtual machine using Terraform, it may take a few minutes for the virtual machine to be created and for it to become available for use. During this time, Terraform will continue to report on the progress of the creation process and will display any errors or issues that may arise. Once the virtual machine has been successfully created, the changes will be reflected in your cloud environment. I go with B
upvoted 2 times
...
FarziWaliMarzi
1 year, 11 months ago
Given it has more than 4 options, I think it should have multiple valid answers, and hence both B & C should be selected. Again, this is assumption based as this is missing in question.
upvoted 1 times
...
faltu1985
2 years, 1 month ago
Selected Answer: B
B for sure
upvoted 1 times
Nightducky
2 years, 1 month ago
Why B? You have "when" not "how long" in the question.
upvoted 1 times
...
...
RVivek
2 years, 2 months ago
Selected Answer: C
When does terraform apply reflect changes in the cloud environment? Terraform will apply chnages to the cloud, then it will update the state file. After it updates the statefile only it "reflects" those changes to the screen
upvoted 1 times
pas77
2 years ago
This is not what the question is asking. The question is not asking when it will reflect the changes in the "screen". It is asking when it will reflect the changes in the "cloud environment". And this will be whenever it finishes deploying the resources. "B" is the correct answer for sure.
upvoted 2 times
...
...
nhatne
2 years, 4 months ago
Selected Answer: C
I vote C because the question is "When" and from the docs: Terraform plan and apply operations run an implicit in-memory refresh as part of their functionality, reconciling any drift from your state file before suggesting infrastructure changes.
upvoted 2 times
...
Eltooth
2 years, 4 months ago
Selected Answer: B
B is correct answer.
upvoted 1 times
...
Zam88
2 years, 5 months ago
B is correct
upvoted 1 times
...
AzureGurl
2 years, 5 months ago
B is the correct answer.
upvoted 1 times
...
temp111
2 years, 6 months ago
I think, the answer is B.
upvoted 4 times
...
Ipergorta
2 years, 6 months ago
Why no B?
upvoted 5 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 ...