Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 167

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.

    Correct Answer: B

    The execution plan created by terraform plan reflects the state of the infrastructure at the time the plan was generated. If the infrastructure is modified manually by a teammate after you ran terraform plan, the actual state will differ from the state recorded in the plan. When terraform apply is executed, it will create a new execution plan based on the current state of the infrastructure, which may result in a different plan compared to the one initially reviewed. Therefore, it is not accurate to assume that the execution plan will remain the same.

Discussion
depal_dhirOption: B

Your plan has been changed. So its best to run the plan again to make sure the desired state is achieved.

BereOption: 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.

keiffo2Option: B

you have run a plan - you colleague has changed the infrastructure, your plan will be wrong now - so false

NunyabiznesOption: 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

Bobby1977

There is no Clarity in the question. If the change applied is same by both the guys then the answer is TRUE else FALSE.

RugarooOption: 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)

090200fOption: B

before apply its better to run terraform plan

chael88Option: B

When you run Apply, it will check if the infrastructure has changed. In this case, the other person made that change.

senthil5000Option: 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.

secdaddyOption: B

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