Skip to content

Commit

Permalink
Fix outputs when ecr-image repo is disabled (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksandom authored Apr 30, 2020
1 parent 781a7fc commit 321868c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/aws/ecr-image/outputs.tf
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}"
}

0 comments on commit 321868c

Please sign in to comment.