Skip to content

Commit

Permalink
feat: Updated output variables for public ecr
Browse files Browse the repository at this point in the history
  • Loading branch information
h1manshu98 committed Aug 11, 2023
1 parent a7afe40 commit bb24148
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#Description : This terraform module is used to create ECR on AWS.

output "registry_id" {
value = join("", aws_ecr_repository.default.*.registry_id)
value = try(aws_ecr_repository.default[0].registry_id, aws_ecrpublic_repository.default[0].registry_id, null)
description = "Registry ID."
}

output "registry_url" {
value = join("", aws_ecr_repository.default.*.repository_url)
value = try(aws_ecr_repository.default[0].repository_url, aws_ecrpublic_repository.default[0].repository_uri, null)
description = "Registry URL."
}

Expand All @@ -17,7 +17,7 @@ output "repository_name" {
}

output "arn" {
value = join("", aws_ecr_repository.default.*.arn)
value = try(aws_ecr_repository.default[0].arn, aws_ecrpublic_repository.default[0].arn, null)
description = "Registry ARN."
}

Expand Down

0 comments on commit bb24148

Please sign in to comment.