Skip to content

Commit

Permalink
outputs for website logic
Browse files Browse the repository at this point in the history
- Only output website values if website is enabled
  • Loading branch information
zachreborn committed Dec 29, 2023
1 parent bcc674f commit 7e11a8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/aws/s3/bucket/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ output "s3_bucket_region" {

output "s3_website_domain" {
description = "Domain of the website endpoint. Can be utilized to create Route 53 alias records"
value = aws_s3_bucket_website_configuration.this[*].website_domain
value = var.enable_website ? aws_s3_bucket_website_configuration.this[0].website_domain : null
}

output "s3_website_endpoint" {
description = "Endpoint of the website"
value = aws_s3_bucket_website_configuration.this[*].website_endpoint
value = var.enable_website ? aws_s3_bucket_website_configuration.this[0].website_endpoint : null
}

0 comments on commit 7e11a8f

Please sign in to comment.