Resource-Lifecycle — HashiCorp Terraform Associate (003) Practice Questions
Resource lifecycle in Terraform refers to the sequence of create, read, update, and delete operations that Terraform performs on a managed resource, and the meta-argument lifecycle block that lets practitioners customize this behavior. Options within the lifecycle block include create_before_destroy, prevent_destroy, ignore_changes, and replace_triggered_by, each of which modifies how Terraform handles updates or deletions for sensitive or stateful resources. The exam tests when and why each lifecycle option is appropriate, how Terraform determines whether a resource requires replacement versus an in-place update, and how dependency ordering interacts with lifecycle settings.
Free questions on resource-lifecycle
What command would you use to safely destroy all resources defined in your Terraform configuration?
Free question · easy · full answer + explanation