nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #264

What happens when you apply Terraform configuration? (Choose TWO correct answers)

The correct answer is A. Terraform makes any infrastructure changes defined in your configuration. C. Terraform updates the state file with any configuration changes it made.. Applying a Terraform configuration results in infrastructure changes being made in the cloud provider and the state file being updated to reflect these changes.

Submitted by marco_it· Apr 18, 2026Use Terraform CLI

Question

What happens when you apply Terraform configuration? (Choose TWO correct answers)

Options

  • ATerraform makes any infrastructure changes defined in your configuration.
  • BTerraform gets the plugins that the configuration requires.
  • CTerraform updates the state file with any configuration changes it made.
  • DTerraform corrects formatting errors in your configuration.
  • ETerraform destroys and recreates all your infrastructure from scratch.

How the community answered

(60 responses)
  • A
    88% (53)
  • B
    3% (2)
  • D
    2% (1)
  • E
    7% (4)

Why each option

Applying a Terraform configuration results in infrastructure changes being made in the cloud provider and the state file being updated to reflect these changes.

ATerraform makes any infrastructure changes defined in your configuration.Correct

When `terraform apply` is executed, Terraform proceeds to create, update, or destroy infrastructure resources in the target cloud provider to match the desired state defined in the configuration files.

BTerraform gets the plugins that the configuration requires.

The process of downloading and configuring provider plugins is handled by `terraform init`, which must be run before `terraform apply`.

CTerraform updates the state file with any configuration changes it made.Correct

Upon successful completion of infrastructure changes, `terraform apply` updates the Terraform state file to accurately reflect the current configuration and status of the managed resources in the real world.

DTerraform corrects formatting errors in your configuration.

Terraform does not automatically correct formatting errors during an `apply` operation; instead, it will report syntax errors and halt, with `terraform fmt` being the command for formatting.

ETerraform destroys and recreates all your infrastructure from scratch.

Terraform apply performs incremental changes to bring the infrastructure to the desired state, only destroying and recreating resources when absolutely necessary due to configuration changes, rather than always starting from scratch.

Concept tested: Terraform apply command actions

Source: https://developer.hashicorp.com/terraform/cli/commands/apply

Topics

#terraform apply#infrastructure changes#state file#CLI commands

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice