Comments (2)
@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:
data "docker_registry_image" "upstream" {
name = "registry1.example.org/ns/foo:latest"
}
resource "docker_image" "local" {
name = data.docker_registry_image.upstream.name
pull_triggers = [data.docker_registry_image.upstream.sha256_digest]
}
resource "docker_tag" "server" {
source_image = docker_image.local.name
target_image = "registry2.example.org/ns/foo:success"
lifecycle {
replace_triggered_by = [
docker_image.local.repo_digest
]
}
}
resource "docker_registry_image" "push" {
keep_remotely = true
name = docker_tag.server.target_image
triggers = {
source_image_hash = docker_tag.server.source_image_id
}
}
Hope this helps!
from terraform-provider-docker.
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 🤮
from terraform-provider-docker.
Related Issues (20)
- Support for automatic spell-checking
- Docker Containers Destroyed if Stopped When Refreshing State HOT 2
- Authentication fails on docker hub
- provider ignoring context if a dockerfile exists in the current directory
- `docker_regsitry_iamge` is not able to pull image metadata from a private registry
- Creation of docker container failed (python image) HOT 1
- `docker_image` doesn't build specified platform
- Lambda consistently fails the FIRST pull from ECR after `docker_image_registry` completed uploading `docker_image` HOT 1
- Support for `docker image import`
- Feat: Support buildtime Secrets
- docker_container devices forces resource replacement at all times HOT 11
- Support for detachable containers
- Conditionally rebuild image
- feat: Add support for additional docker_image build contexts
- Flaky `Error response from daemon: Conflict, cannot remove the default link name of the container` on `terraform destroy`
- Support for VolumeOptions.Subpath in docker_container.mounts.volume_options HOT 1
- Support for Docker Cluster Volumes HOT 1
- Error during pushing image to GCP Artifact Registry, Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed HOT 1
- Error when pushing ECR public registry: `unable to get digest: Got bad response from registry: 400 Bad Request`
- Support for error message when service didn't converge
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-docker.