mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-20 22:59:42 -05:00
* fix(service): remove image name suppress function * feat: add docker image data-source * docs(service): add example for iamge datasource usage * fix: image repo digest with tag determination * fix: always return a repoDigest * fix(image): deprecation notice for latest attribute * fix(ci): explicitly go get tfplugindocs * fix(ci): remove gocenter.io proxy
19 lines
302 B
HCL
19 lines
302 B
HCL
data "docker_image" "foo" {
|
|
name = "repo.mycompany.com:8080/foo-service:v1"
|
|
}
|
|
|
|
resource "docker_service" "foo" {
|
|
name = "foo-service"
|
|
|
|
task_spec {
|
|
container_spec {
|
|
image = data.docker_image.foo.repo_digest
|
|
}
|
|
}
|
|
|
|
endpoint_spec {
|
|
ports {
|
|
target_port = "8080"
|
|
}
|
|
}
|
|
}
|