Open SpamapS opened 4 years ago
Hey @SpamapS π Thank you for taking the time to file this issue! Given that there's been a number of Terraform and AWS provider releases since you initially filed it, can you confirm if you're still experiencing this behavior?
No I cannot, unfortunately, I no longer work with AWS RDS.
I created two similar terraform configurations in the same AWS account/region. Upon applying the first, it created a database instance. The second finished very quickly, and when I looked in the console, I saw only one RDS instance. I noticed right away that the variable I was using to specify the name had left off a suffix, so they shared the same name and basically the same configuration including subnet groups and security groups.
This could have led to massive database corruption, as two deployments would have tried to use the same database.
I would have expected the second one to explode and tell me it couldn't create another database of the same name.
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Available upon request.
Panic Output
N/A
Expected Behavior
I would expect duplicate databases in different state files to block each other, with one succeeding, and the other failing because the resource already exists.
Actual Behavior
Terraform happily assimilates the resource from the first, leading to dual-ownership.
Steps to Reproduce
Important Factoids
N/A
References