feat(dummy): add new controls for the destroy phase#1144
Conversation
There was a problem hiding this comment.
Pull request overview
Adds destroy-phase controls to the modules/dummy Terraform module so CI/CD pipelines can simulate slow or failing terraform destroy runs (per #1143).
Changes:
- Introduces new module inputs
sleep_on_destroyandcrash_on_destroy. - Adds destroy-time
null_resourceprovisioners to sleep and/or intentionally fail during destroy. - Updates the module README usage example to show the new destroy-time controls.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
modules/dummy/variables.tf |
Adds new input variables for destroy-phase sleep/crash behavior. |
modules/dummy/main.tf |
Implements destroy-time sleep/crash behavior via null_resource + local-exec provisioners. |
modules/dummy/README.md |
Documents usage example including the new destroy-time controls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/prefapp/tfm/sessions/0dcdb3f7-e35b-422f-8cca-4b005150b46c Co-authored-by: frmadem <6397709+frmadem@users.noreply.github.com>
Agent-Logs-Url: https://github.com/prefapp/tfm/sessions/82b9221c-3a39-4398-88ac-681579282c9e Co-authored-by: frmadem <6397709+frmadem@users.noreply.github.com>
|
@copilot i need you to make the necessary changes to this module to be conformant with the CONTRIBUTING.md guide found at the root of this repository. The final readme will be generated by me. |
Agent-Logs-Url: https://github.com/prefapp/tfm/sessions/8c483352-1ba3-4d90-95cd-287c8a014c3b Co-authored-by: frmadem <6397709+frmadem@users.noreply.github.com>
Done in commit
|
Adds destroy-phase controls to the
modules/dummyTerraform module so CI/CD pipelines can simulate slow or failingterraform destroyruns, and brings the module into conformance with the repository CONTRIBUTING.md guide.Changes Made
modules/dummy/main.tfto LF.validationblock tosleep_on_destroyto require a non-negative integer value.conditional_destroy_sleepandconditional_destroy_crashto always usecount = 1, gating the actual behavior inside the destroy-time provisioner command so these resources are always in state.depends_onfromconditional_destroy_crashtoconditional_destroy_sleepto ensure sleep always runs before crash when both are enabled..terraform-docs.yml— standard terraform-docs configurationoutputs.tf— outputs extracted frommain.tfinto a dedicated filedocs/header.md— module overview, key features, and basic usage examplesdocs/footer.md— example links, provider resources, and support section_examples/basic/main.tf— functional example demonstrating all six control variablesREADME.md— replaced with terraform-docs inject markers, ready for generation