From 67081742d2231497af2732b6097bed2b704ea4ec Mon Sep 17 00:00:00 2001 From: Adam Crews Date: Tue, 9 Jun 2020 19:29:36 -0700 Subject: [PATCH] Add bucket_regoinal_domain_name as an output (#28) Co-authored-by: Andriy Knysh Co-authored-by: Erik Osterman --- README.md | 1 + docs/terraform.md | 1 + outputs.tf | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index b98de277..37ea0eb4 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,7 @@ Available targets: | bucket_arn | Bucket ARN | | bucket_domain_name | FQDN of bucket | | bucket_id | Bucket Name (aka ID) | +| bucket_regional_domain_name | The bucket region-specific domain name | | enabled | Is module enabled | | secret_access_key | The secret access key. This will be written to the state file in plain-text | | user_arn | The ARN assigned by AWS for the user | diff --git a/docs/terraform.md b/docs/terraform.md index c214baed..8b5ae8a7 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -41,6 +41,7 @@ | bucket_arn | Bucket ARN | | bucket_domain_name | FQDN of bucket | | bucket_id | Bucket Name (aka ID) | +| bucket_regional_domain_name | The bucket region-specific domain name | | enabled | Is module enabled | | secret_access_key | The secret access key. This will be written to the state file in plain-text | | user_arn | The ARN assigned by AWS for the user | diff --git a/outputs.tf b/outputs.tf index cd310d1d..35b1eb9e 100644 --- a/outputs.tf +++ b/outputs.tf @@ -3,6 +3,11 @@ output "bucket_domain_name" { description = "FQDN of bucket" } +output "bucket_regional_domain_name" { + value = var.enabled ? join("", aws_s3_bucket.default.*.bucket_regional_domain_name) : "" + description = "The bucket region-specific domain name" +} + output "bucket_id" { value = var.enabled ? join("", aws_s3_bucket.default.*.id) : "" description = "Bucket Name (aka ID)"