mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-21 07:09:48 -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
476 B
HCL
19 lines
476 B
HCL
# uses the 'latest' tag
|
|
data "docker_image" "latest" {
|
|
name = "nginx"
|
|
}
|
|
|
|
# uses a specific tag
|
|
data "docker_image" "specific" {
|
|
name = "nginx:1.17.6"
|
|
}
|
|
|
|
# use the image digest
|
|
data "docker_image" "digest" {
|
|
name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2"
|
|
}
|
|
|
|
# uses the tag and the image digest
|
|
data "docker_image" "tag_and_digest" {
|
|
name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2"
|
|
}
|