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

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

You have modified your local Terraform configuration and ran terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

  • 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
depal_dhir
Highly Voted 2 years, 2 months ago
Selected Answer: B
Your plan has been changed. So its best to run the plan again to make sure the desired state is achieved.
upvoted 7 times
...
Bere
Highly Voted 10 months ago
Selected Answer: B
The execution plan created by terraform plan is based on the state at the time terraform plan was run. If the actual infrastructure has been manually modified by your teammate after you ran terraform plan, then the infrastructure will have diverged from what Terraform believes it to be. When you subsequently run terraform apply, Terraform will create a new execution plan based on the current state of the infrastructure, not on the plan you previously viewed. This means the execution plan during apply could be different if the infrastructure has been changed outside of Terraform after the initial plan command was executed. It's always a good practice to run terraform plan again just before terraform apply, especially in environments where manual changes to the infrastructure might occur.
upvoted 6 times
...
090200f
Most Recent 4 months ago
Selected Answer: B
before apply its better to run terraform plan
upvoted 1 times
...
Nunyabiznes
1 year, 7 months ago
Selected Answer: B
To ensure that the execution plan you reviewed with terraform plan is the exact one used by terraform apply, you can save the plan to a file and pass that file to terraform apply. For example: terraform plan -out=my_plan.tfplan terraform apply my_plan.tfplan
upvoted 3 times
...
chael88
1 year, 10 months ago
Selected Answer: B
When you run Apply, it will check if the infrastructure has changed. In this case, the other person made that change.
upvoted 1 times
...
senthil5000
1 year, 11 months ago
Selected Answer: B
Running terraform plan is optional. Even if we run terraform apply directly without running terraform plan before, it will check for infrastructure before applying.
upvoted 1 times
...
Rugaroo
1 year, 11 months ago
Selected Answer: B
Question is unclear however, if you read it carefully it mentions the 'execution plan' which is the plan terraform runs first during an 'apply' before making the actual changes (verified in my lab). If the infrastructure has changed between the first 'plan' and the 'apply' the 'apply' plan will detect the changes made which are not stored in state file and thus there would be a difference. (Answer is B)
upvoted 2 times
...
secdaddy
1 year, 11 months ago
Terraform plan gives a plan Colleague changes infra manually We run apply and the execution plan may change based on what still needs to be done to bring the infrastructure in line with the terraform configuration. I'll guess false
upvoted 1 times
...
Bobby1977
2 years, 1 month ago
There is no Clarity in the question. If the change applied is same by both the guys then the answer is TRUE else FALSE.
upvoted 3 times
...
keiffo2
2 years, 2 months ago
you have run a plan - you colleague has changed the infrastructure, your plan will be wrong now - so false
upvoted 4 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 ...