-
Notifications
You must be signed in to change notification settings - Fork 198
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
Image argument after v2.6.0 always replaces resources (mismatch between image name vs sha image id) #49
Comments
This issue is stale because it has been open 60 days with no activity. |
remove stale |
I checked the document of v2.6.0.
|
Please use the latest version and check the problem occurs. https://github.com/kreuzwerker/terraform-provider-docker/blob/master/CONTRIBUTING.md#write-issue |
I've just tried 2.11.0 of this provider
I still get a plan change:
If I revert to 2.6.0 this does not happen, instead I get
The configuration of images is like this
I'll try and find some time to make a stand-alone example for you. |
Related to #161 |
This issue is stale because it has been open 60 days with no activity. |
This still appears to be an issue with the current version.
|
After trying a couple of different things it seems like an interplay between If |
This issue was originally opened by @johnlane as hashicorp/terraform-provider-docker#294. It was migrated here as a result of the community provider takeover from @kreuzwerker. The original body of the issue is below.
There is a difference between the handling of the
image
argument of v2.6.0 and v2.7.2.The image specification shown below works with the 2.6.0 Docker provider but not with version 2.7.2.
The documentation now shows having a reference to an image resource:
and configuring that image resource to specify the image name.
With 2.7.2 there is a perpetual mismatch between the image name spcified in the config and the image id that
terraform plan
andapply
identifies.I can't find any documentation covering this breaking change between versions, I don't know if this break is intentional or something that would be fixed. I see many examples illustrating the succinct way of referencing an image that works in version 2.6.0. It would be good if specifying the image directly in
image
continued to work rather than requiring an additional image resource block containing the image name.If the form that worked in 2.6.0 is not supported any more than an error during plan or apply to prevent its use would make this clear. Currently it's accepted as valid but causes resource replacement on every apply.
Terraform Version
Terraform 0.13.3 with Docker provider 2.6.0 and 2.7.2
Affected Resource(s)
docker_container
Expected Behavior
The resource should be matched with previous state so unnecessary changes are not made.
Actual Behavior
The resource is detected as a change because the given image value is matched against SHA and therefore is always detected as a change, requiring replacement of the resource.
Steps to Reproduce
terraform apply
References
hashicorp/terraform#26382
Also hashicorp/terraform-provider-docker#291 is similar.
The text was updated successfully, but these errors were encountered: