forked from terraform-aws-modules/terraform-aws-s3-bucket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
49 lines (40 loc) · 2.24 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
output "s3_bucket_id" {
description = "The name of the bucket."
value = try(aws_s3_bucket_policy.this[0].id, aws_s3_bucket.this[0].id, "")
}
output "s3_bucket_arn" {
description = "The ARN of the bucket. Will be of format arn:aws:s3:::bucketname."
value = try(aws_s3_bucket.this[0].arn, "")
}
output "s3_bucket_bucket_domain_name" {
description = "The bucket domain name. Will be of format bucketname.s3.amazonaws.com."
value = try(aws_s3_bucket.this[0].bucket_domain_name, "")
}
output "s3_bucket_bucket_regional_domain_name" {
description = "The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL."
value = try(aws_s3_bucket.this[0].bucket_regional_domain_name, "")
}
output "s3_bucket_hosted_zone_id" {
description = "The Route 53 Hosted Zone ID for this bucket's region."
value = try(aws_s3_bucket.this[0].hosted_zone_id, "")
}
output "s3_bucket_lifecycle_configuration_rules" {
description = "The lifecycle rules of the bucket, if the bucket is configured with lifecycle rules. If not, this will be an empty string."
value = try(aws_s3_bucket_lifecycle_configuration.this[0].rule, "")
}
output "s3_bucket_policy" {
description = "The policy of the bucket, if the bucket is configured with a policy. If not, this will be an empty string."
value = try(aws_s3_bucket_policy.this[0].policy, "")
}
output "s3_bucket_region" {
description = "The AWS region this bucket resides in."
value = try(aws_s3_bucket.this[0].region, "")
}
output "s3_bucket_website_endpoint" {
description = "The website endpoint, if the bucket is configured with a website. If not, this will be an empty string."
value = try(aws_s3_bucket_website_configuration.this[0].website_endpoint, "")
}
output "s3_bucket_website_domain" {
description = "The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records."
value = try(aws_s3_bucket_website_configuration.this[0].website_domain, "")
}