Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 114


You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully.

What will happen if you terraform apply again immediately afterwards without changing any Terraform code?

Show Answer
Correct Answer: D

If you run terraform apply again immediately afterwards without changing any Terraform code, Terraform will compare the desired state with the actual state of the infrastructure as recorded in the state file. Since there are no changes, Terraform will report that there are no differences and won't apply any changes. Therefore, nothing will happen.

Discussion

9 comments
Sign in to comment
BereOption: D
Nov 29, 2024

If you run terraform apply again immediately afterwards without changing any Terraform code, Terraform will compare the desired state with the actual state of the infrastructure as recorded in the state file. Since there are no changes, then Terraform will report that there are no differences and won't do anything.

amanpOption: D
Sep 5, 2023

Nothing. If the desired state in state file is same as current state, no changes will happen

BurakkoOption: D
Sep 1, 2023

Nothing without changing the configuration file, the state file or desired state.

legendary7
Sep 29, 2023

D is the correct answer. Terraform would refresh and see that the current state and the desired state are the-same and hence would do nothing

InformationOverloadOption: D
Jan 2, 2024

keyword: Idempotent

Power123
Mar 31, 2024

Nothing. Answer is D

shopkittyOption: D
Sep 8, 2023

nothing change hence do nothing

adoubanOption: D
Dec 12, 2023

Nothing

Ni33Option: D
May 9, 2024

D-Nothing