Back to Developer Roadmap

Resource Lifecycle

src/data/roadmaps/terraform/content/resource-lifecycle@76kp98rvph_8UOXZR-PBC.md

4.01017 B
Original Source

Resource Lifecycle

Each Terraform resource is subject to the lifecycle: Create, Update or Recreate, Destroy. When executing terraform apply, each resource:

  • which exists in configuration but not in state is created
  • which exists in configuration and state and has changed is updated
  • which exists in configuration and state and has changed, but cannot updated due to API limitation is destroyed and recreated
  • which exists in state, but not (anymore) in configuration is destroyed

The lifecycle behaviour can be modified to some extend using the lifecycle meta argument.

Learn more from the following resources: