Created
October 24, 2024 02:01
-
-
Save nbcchen/d4e54c33a3c358a2d3fd15581abd067f to your computer and use it in GitHub Desktop.
Construct ECR image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "aws_ecr_repository" "repo" { | |
name = var.repository_name | |
} | |
locals { | |
image = "${data.aws_ecr_repository.repo.repository_url}:${var.image_tag}" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hashicorp/aws >= 5.39.1 | |
data "aws_ecr_image" "this" { | |
repository_name = var.repository_name | |
image_tag = var.image_tag | |
} | |
locals { | |
image = data.aws_ecr_image.this.image_uri | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment