Skip to content

Commit

Permalink
docs: create_before_destroy meta-attribute propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensho committed Jul 21, 2023
1 parent ad26644 commit 1287ad4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/docs/language/meta-arguments/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ The arguments available within a `lifecycle` block are `create_before_destroy`,
such features, so you must understand the constraints for each resource
type before using `create_before_destroy` with it.

Note that Terraform propagates and applies `create_before_destroy` meta-attribute
behaviour to all resource dependencies. For example, if resource A with enabled
`create_before_destroy` depends on resource B with disabled `create_before_destroy`
(by default), then Terraform enables `create_before_destroy` for resource B
implicitly and stores it to the state file. You cannot override `create_before_destroy`
to `false` on resource B, because that would imply dependency cycles in the graph.

Destroy provisioners of this resource do not run if `create_before_destroy`
is set to `true`. This [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.

Expand Down

0 comments on commit 1287ad4

Please sign in to comment.