We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
docker_image
resource "docker_image" "test" { name = aws_ecr_repository.test.repository_url build { context = "${path.cwd}/test/app/" network_mode = "host" } triggers = { dir_sha1 = sha1(join("", [for f in fileset(path.cwd, "test/app/**") : filesha1(f)])) } } resource "docker_registry_image" "test" { name = docker_image.test.name }
# module.test.docker_image.test must be replaced -/+ resource "docker_image" "test" { ~ id = "sha256:a95c0bae654940c795a068819903e31b05e50e141d4deb15a821a65932bf6dd0123456789012.dkr.ecr.eu-west-1.amazonaws.com/test" -> (known after apply) ~ image_id = "sha256:a95c0bae654940c795a068819903e31b05e50e141d4deb15a821a65932bf6dd0" -> (known after apply) name = "123456789012.dkr.ecr.eu-west-1.amazonaws.com/test" + repo_digest = (known after apply) ~ triggers = { # forces replacement ~ "dir_sha1" = "da39a3ee5e6b4b0d3255bfef95601890afd80709" -> "7d60b91a026d68438e5f3b043e42f5fce5080152" } - build { - build_arg = {} -> null - build_args = {} -> null - cache_from = [] -> null - context = "/var/lib/jenkins/jobs/dctic-infra-newco-cuadro-mandos/workspace/test/app/" -> null - cpu_period = 0 -> null - cpu_quota = 0 -> null - cpu_shares = 0 -> null - dockerfile = "Dockerfile" -> null - extra_hosts = [] -> null - force_remove = false -> null - label = {} -> null - labels = {} -> null - memory = 0 -> null - memory_swap = 0 -> null - network_mode = "host" -> null - no_cache = false -> null - pull_parent = false -> null - remove = true -> null - security_opt = [] -> null - shm_size = 0 -> null - squash = false -> null - suppress_output = false -> null - tag = [] -> null } + build { + cache_from = [] + context = "/var/lib/jenkins/jobs/test/workspace/test/app/" + dockerfile = "Dockerfile" + extra_hosts = [] + network_mode = "host" + remove = true + security_opt = [] + tag = [] } }
Terraform detect the changes, based in the content of the folder "test/app/**" The expected behavior is run the docker build process
docker build
Plan: 1 to add, 0 to change, 1 to destroy. module.test.docker_image.test: Destroying... [id=sha256:a95c0bae654940c795a068819903e31b05e50e141d4deb15a821a65932bf6dd0123456789012.dkr.ecr.eu-west-1.amazonaws.com/test] module.test.docker_image.test: Destruction complete after 0s module.test.docker_image.test: Creating... module.test.docker_image.test: Creation complete after 0s [id=sha256:9833e0abaeed50b02d241278913fa2568e515b5c9c5895ce5cad463c4e913330123456789012.dkr.ecr.eu-west-1.amazonaws.com/test]
The initial build was fine but now is not building an updated version, the creation is completed after 0s and not push a new image.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Community Note
Terraform (and docker Provider) Version
Affected Resource(s)
docker_image
Terraform Configuration Files
Debug Output
Expected Behaviour
Terraform detect the changes, based in the content of the folder "test/app/**"
The expected behavior is run the
docker build
processActual Behaviour
The initial build was fine but now is not building an updated version, the creation is completed after 0s and not push a new image.
The text was updated successfully, but these errors were encountered: