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
Any change to the upstream image at registry1.example.org/ns/foo:latest should ultimately result in a copy at registry2.example.org/ns/foo:success.
Actual Behaviour
A change to the upstream image at registry1.example.org/ns/foo:latest is detected by the upstream data source and successfully triggers the local image resource to pull the image to the local docker instance. In my case, this is an ephemeral build server instance which disappears after the build pipeline regardless of success for failure, so this is seen as a new resource at every plan.
However, because the values of the docker_tag's source_image and target_image technically never change, the docker_tag resource never detects source image change and thus the image is never published to registry2....
The text was updated successfully, but these errors were encountered:
Would be very nice to add a triggers property like docker_registry_image so it is revalidated against the sha, for example.
My workaround is to taint the tag but that of course is manual 馃ぎ
@labmonkey42 I fully agree that it would be nice for the docker_tag resource to have a triggers parameter that mimics the functionality of other resources like docker_image and docker_registry_image.
In the meantime, I managed to implement a workaround using Terraform's replace_triggered_by. If you're on Terraform >= 1.2 this might work for you too:
Community Note
Terraform (and docker Provider) Version
1.3.9
Affected Resource(s)
docker_tag
Terraform Configuration Files
Expected Behaviour
Any change to the upstream image at
registry1.example.org/ns/foo:latest
should ultimately result in a copy atregistry2.example.org/ns/foo:success
.Actual Behaviour
A change to the upstream image at
registry1.example.org/ns/foo:latest
is detected by theupstream
data source and successfully triggers thelocal
image resource to pull the image to the local docker instance. In my case, this is an ephemeral build server instance which disappears after the build pipeline regardless of success for failure, so this is seen as a new resource at every plan.However, because the values of the
docker_tag
'ssource_image
andtarget_image
technically never change, thedocker_tag
resource never detects source image change and thus the image is never published toregistry2...
.The text was updated successfully, but these errors were encountered: