Resource Lifecycle
Last updated
What is 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.
Free resources to learn Resource Lifecycle
- Official docsHow Terraform Applies a Configuration
- Official docsThe lifecycle Meta-Argument
- Article@Article@Terraform Resource Lifecycle Meta-Argument
More in stage 3: Providers
Resource Lifecycle: common questions
Can I learn Resource Lifecycle in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Resource Lifecycle in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Resource Lifecycle tutorial for beginners?
It is lesson 15 of 110 in the free Terraform roadmap, in stage 3, Providers. If you are new to Terraform, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.