-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Upgrading from 0.6.13 to 0.6.16 forced destroy/add #6798
Comments
Update: I reverted Here's the git diff of the As you can see, on every single instance, it's basically just setting
Also, at the bottom you can see it attempting to recreate the VPC, due to a missing |
Reading this sort of issue report scares me immensely. |
Hey @joshpurvis there was a regression in v0.6.16 regarding AWS Instances and security groups. If your instances are in a VPC, you need to use The regression has been reverted in I explain in more detail here: Please try |
Got caught up in work, but for future searchers-- this was in fact the issue. Thanks @catsby! |
Thanks for following up @joshpurvis ! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
After attempting to upgrade from 0.6.13 to 0.6.16, it appears to have corrupted my tfstate file on the first tf plan. When I do a
terraform plan
it's saying:Plan: 42 to add, 68 to change, 42 to destroy.
42 is the number of
aws_instance
resources I have.At initial glance, it looks like the
aws_security_groups
have changed in every single one of them (But they haven't)Here's one of my
aws_instances
(they all look pretty much like this, except with their respective security groups differing.And the resource itself looks like this (and the two security groups that were there below):
Then I noticed this change on some of my
aws_route_table
s:Here's the resource for that:
It doesn't appear to be interpolating the dynamic
${aws_instance.nat.id}
variable. As a test, I hard coded that instance ID (as shown in commented line above) in theaws_route_table.r_private
resource, and it removed this required change from my plan.Given this, I assume something similar is happening with the security groups not being interpolated, and thus forcing new resources for all my instances.
Another thing I noticed, and fixed similarly was this one:
I didn't have
instance_tenancy
in myaws_vpc
resource. I Added it, and set to default, and it removed this from the plan as well.Every
aws_route53_record
is also needing to be changed, they all look like this in the plan:Possible affected resource types:
Things I've tried:
I also have older state files in source control, but haven't attempted those yet, as I'm not exactly sure which one to use.(see comment below)Any help would be appreciated. Let me know if there's any other info that would help diagnose the situation
Thanks!
The text was updated successfully, but these errors were encountered: