-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Apply wants to replace all resources after upgrade to 0.13.3 #26382
Comments
Hi @johnlane! Sorry for this odd behavior. I share your suspicion that this is something related to the docker provider rather than to Terraform Core. Specifically, it seems like the provider has changed its representation of this hashicorp/terraform-provider-docker#291 seems like a similar symptom to what you are seeing here. Your output doesn't include a I'm going to close this for now because I think we should see how hashicorp/terraform-provider-docker#291 turns out first. If the Docker provider team ends up determining that this is a Terraform Core issue then we'd be happy to dig in some more if you or they can open an issue with some more details on how to reproduce it, as requested in our bug report template. Thanks for reporting this! |
Thanks @apparentlymart for commenting on this issue. I came to pretty much the same conclusion myself, and did some background reading. My config contains lines like this:
I read up on this last night and, despite the many tutorials using the above form, the documentation shows having a reference to an image resource:
and configuring that image resource to specify the image name. I don't know if or when the documentation changed to be like that but I don't think I would not have done that if the documentation at the time said to do that. Although git-blame shows that to not have changed since 2015 so I don't know (I started this Terraform config late last year). And I can't find anything alluding to this change in behaviour in the provider's changelog. I just downgraded the Docker provider to 2.6.0 and I once again have a clean Apart from this issue, my upgrade was pretty painless. I just had to update
|
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. |
I have just upgraded from v0.12.24 to v0.13.3. Prior to the upgrade
terraform apply
reported no changes. After the upgrade, I have a cleanterraform init
. Now, when I doterraform apply
it wants to replace all resources citing the image value as the thing forcing change:I believe I followed the documented upgrade procedure, I really don't want to cause an unnecessary replacement of all resources. Is there a way to fix this or work around it ?
I am using the local backend. I've tried
terraform refresh
and also destroying and recreating a single resource (using-target
) - I can destroy and recreate the resource but it's still being identified as different due to the image difference.If I do
terraform state pull
the images are identified as a sha whereasterraform apply
identified them by name.I've just noticed it is only docker resources. Other resources are fine. It's probably to do with the docker provider, I'll do some more research and then close this out if I find that's the case.
The text was updated successfully, but these errors were encountered: