-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix outputs when ecr-image repo is disabled (#96)
- Loading branch information
1 parent
781a7fc
commit 321868c
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
output "ecr_repo_arn" { | ||
description = "The unique ID (ARN) of the ECR repo." | ||
value = "${aws_ecr_repository.ecr_repo[0].arn}" | ||
value = var.is_disabled ? null : "${aws_ecr_repository.ecr_repo[0].arn}" | ||
} | ||
output "ecr_repo_root" { | ||
description = "The path to the ECR repo, excluding image name." | ||
value = "${dirname(aws_ecr_repository.ecr_repo[0].repository_url)}" | ||
value = var.is_disabled ? null : "${dirname(aws_ecr_repository.ecr_repo[0].repository_url)}" | ||
} | ||
output "ecr_image_url" { | ||
description = "The full path to the ECR image, including image name." | ||
value = "${aws_ecr_repository.ecr_repo[0].repository_url}" | ||
value = var.is_disabled ? null : "${aws_ecr_repository.ecr_repo[0].repository_url}" | ||
} | ||
output "ecr_image_url_and_tag" { | ||
description = "The full path to the ECR image, including image name and tag." | ||
value = "${aws_ecr_repository.ecr_repo[0].repository_url}:${var.tag}" | ||
value = var.is_disabled ? null : "${aws_ecr_repository.ecr_repo[0].repository_url}:${var.tag}" | ||
} |