Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support optionally not overwriting saved terraformOptions if present #1318

Closed
bt-macole opened this issue Jun 28, 2023 · 0 comments · Fixed by #1319
Closed

Support optionally not overwriting saved terraformOptions if present #1318

bt-macole opened this issue Jun 28, 2023 · 0 comments · Fixed by #1319

Comments

@bt-macole
Copy link
Contributor

In some cases uses test-structures its possible to accidentally create duplicate resources or corrupt/overwrite state files due to overwriting saved test data.

For example, if you have a test structure stage that uses a random aws region and you re-run your tests without destroying, you then overwrite the terraform options and apply with the new ones. This could totally orphan the existing resources, duplicating resources and making it a challenge to harness the power of terratest/terraform when cleaning up resources post test.

bt-macole added a commit to bt-macole/terratest that referenced this issue Jun 28, 2023
SaveTestData is a powerful feature. But with great power comes great responsibility. If a user is not careful, this feature can cause unintended side effects including duplicating resources and overwriting state.

Adding support for only saving if a file does not exists prevent overwriting contents and provides terratest users protection from themselves.

resolves gruntwork-io#1318
bt-macole added a commit to bt-macole/terratest that referenced this issue Jun 28, 2023
SaveTestData is a powerful feature. But with great power comes great responsibility. If a user is not careful, this feature can cause unintended side effects including duplicating resources and overwriting state.

Adding support for only saving if a file does not exists prevent overwriting contents and provides terratest users protection from themselves.

resolves gruntwork-io#1318
bt-macole added a commit to bt-macole/terratest that referenced this issue Jul 10, 2023
SaveTestData is a powerful feature. But with great power comes great responsibility. If a user is not careful, this feature can cause unintended side effects including duplicating resources and overwriting state.

Adding support for only saving if a file does not exists prevent overwriting contents and provides terratest users protection from themselves.

resolves gruntwork-io#1318
bt-macole added a commit to bt-macole/terratest that referenced this issue Jul 10, 2023
SaveTestData is a powerful feature. But with great power comes great responsibility. If a user is not careful, this feature can cause unintended side effects including duplicating resources and overwriting state.

Adding support for only saving if a file does not exists prevent overwriting contents and provides terratest users protection from themselves.

resolves gruntwork-io#1318
bt-macole added a commit to bt-macole/terratest that referenced this issue Jul 21, 2023
SaveTestData is a powerful feature. But with great power comes great responsibility. If a user is not careful, this feature can cause unintended side effects including duplicating resources and overwriting state.

Adding support for only saving if a file does not exists prevent overwriting contents and provides terratest users protection from themselves.

resolves gruntwork-io#1318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant