nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #206

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…

The correct answer is D. Nothing. Terraform follows a declarative approach, meaning it ensures the infrastructure matches the If you run terraform apply again without any changes, Terraform will detect that the infrastructure is already up to date and will do nothing. The command will complete successfully with…

Submitted by hans_de· Apr 18, 2026Understand Terraform Basics

Question

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 afterward without changing any Terraform code?

Options

  • ATerraform will terminate and recreate the VM.
  • BTerraform will create another duplicate VM.
  • CTerraform will apply the VM to the state file.
  • DNothing

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    5% (1)
  • D
    91% (20)

Explanation

Terraform follows a declarative approach, meaning it ensures the infrastructure matches the If you run terraform apply again without any changes, Terraform will detect that the infrastructure is already up to date and will do nothing. The command will complete successfully with the message "No changes. Your infrastructure matches the configuration."

Topics

#Terraform apply workflow#Idempotency#Terraform state#Desired state

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice