I am trying to run a script when a module gets removed from a project. The workflow that I use is we remove the reference to the module in the tf file to do the destroy. This causes the script not to kick off, if I run terraform destroy then it works. Is there any other method to get this to work?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Terraform add option to disable provisioner "when=destroy" when resource is being replaced (destroyed and then recreated) | 0 | 259 | August 17, 2023 | |
Referencing the Terraform command used | 1 | 131 | January 15, 2024 | |
How to evaluate the `prevent_destroy` argument | 3 | 363 | October 20, 2022 | |
Destroy resource after run | 0 | 229 | October 1, 2020 | |
TF 1.0.10: When removing count from module, plan wants to destroy then re-create everything | 0 | 372 | December 7, 2021 |