Skip to content

Commit

Permalink
refa: added try function to outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kfc-manager committed Mar 8, 2024
1 parent 0073db4 commit bacbd9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
output "id" {
description = "ID of the S3 bucket."
value = aws_s3_bucket.main.id
description = "The ID of the S3 bucket."
value = try(aws_s3_bucket.main.id, null)
}

output "arn" {
description = "ARN of the S3 bucket."
value = aws_s3_bucket.main.arn
description = "The ARN of the S3 bucket."
value = try(aws_s3_bucket.main.arn, null)
}

output "queues" {
description = "List of objects of each created queue."
value = [for index, value in var.queues : {
value = [for index, value in try(var.queues, []) : {
url = aws_sqs_queue.main[index].url
arn = aws_sqs_queue.main[index].arn
}]
Expand Down

0 comments on commit bacbd9b

Please sign in to comment.