GoogleCloudPlatform / terraform-python-testing-helper

Simple Python test helper for Terraform.
https://pypi.org/project/tftest/
Apache License 2.0
214 stars 31 forks source link

Handling prevent destroy within tests scenarios for module have other module dependencies #59

Closed crjlty88 closed 2 years ago

crjlty88 commented 2 years ago

Similar situation with #42, if a module inside have other module dependencies have prevent destroy will cause the test will fail because current disable_prevent_destroy option only update terraform file in current folder, and this operation should apply to all terraform within .terraform/modules folder.

ludoo commented 2 years ago

I don't see this as simple or straightforward to implement. The best workaround for this kind of situations is to implement it in a custom test fixture. Closing this, but feel free to reopen if you figure out a simple way of doing it.