You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A common pattern I see when writing tests with Terratest, is to use random.UniqueId() for resource naming so that naming collisions will not conflict during parallel testing.
However, during the destroy phase, if the call to AWS api's is retried then a new random.UniqueId() is generated and passed to the destroy call to AWS. This of course will not exist and ultimately the destroy with fail.
This mean that for resources with random.UniqueId() identifiers, the destroy will either work the first time or not at all.
To Reproduce
Steps to reproduce the behavior, code snippets and examples which can be used to reproduce the issue.
Hi @cgradwohl-playq, based on the code you shared, I don't see where the random ID is generated. During terraform destroy, it should use the ID stored in the state from when the resources were applied, so it shouldn't behave as you're describing. Could you provide more details on how to reproduce the issue you're experiencing?
Describe the bug
A common pattern I see when writing tests with Terratest, is to use random.UniqueId() for resource naming so that naming collisions will not conflict during parallel testing.
However, during the destroy phase, if the call to AWS api's is retried then a new random.UniqueId() is generated and passed to the destroy call to AWS. This of course will not exist and ultimately the destroy with fail.
This mean that for resources with random.UniqueId() identifiers, the destroy will either work the first time or not at all.
To Reproduce
Steps to reproduce the behavior, code snippets and examples which can be used to reproduce the issue.
Expected behavior
The destroy should work, even if the underlying call to AWS fails or retries.
Nice to have
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: