Merge pull request #28345 from yvespp/destroy_provisioners_doc

document that destroy provisioners don't run with create_before_destroy
This commit is contained in:
Laura Pacilio 2021-09-03 10:19:30 -04:00 committed by GitHub
commit 1e1d47d16d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,9 @@ The following arguments can be used within a `lifecycle` block:
such features, so you must understand the constraints for each resource
type before using `create_before_destroy` with it.
Destroy provisioners of this resource will not run if `create_before_destroy`
is set to `true`. We may address this in the future, and this [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
* `prevent_destroy` (bool) - This meta-argument, when set to `true`, will
cause Terraform to reject with an error any plan that would destroy the
infrastructure object associated with the resource, as long as the argument

View File

@ -236,6 +236,9 @@ fail, Terraform will error and rerun the provisioners again on the next
`terraform apply`. Due to this behavior, care should be taken for destroy
provisioners to be safe to run multiple times.
Destroy provisioners of this resource will not run if `create_before_destroy`
is set to `true`. We may address this in the future, and this [GitHub issue](https://github.com/hashicorp/terraform/issues/13549) contains more details.
Destroy-time provisioners can only run if they remain in the configuration
at the time a resource is destroyed. If a resource block with a destroy-time
provisioner is removed entirely from the configuration, its provisioner