terraform-aws-s3-bucket module. Use these outputs to reference bucket attributes in other Terraform resources and modules.
Bucket Identity
The name of the bucket. For directory buckets, this returns the directory bucket name.
The ARN of the bucket. Will be of format
arn:aws:s3:::bucketname.The AWS region this bucket resides in.
Tags assigned to the bucket.
Domain Names
The bucket domain name. Will be of format
bucketname.s3.amazonaws.com.The bucket region-specific domain name, including the region name in the URL. Use this with AWS CloudFront to avoid redirect issues when specifying an S3 region-specific endpoint as a CloudFront origin.
The Route 53 Hosted Zone ID for this bucket’s region. Useful for creating Route 53 alias records pointing to the bucket.
Configuration State
The lifecycle rules of the bucket, if the bucket is configured with lifecycle rules. Returns an empty string if no lifecycle configuration is present.
The policy of the bucket, if the bucket is configured with a policy. Returns an empty string if no policy is attached.
The versioning status of the bucket. Will be
Enabled, Suspended, or Disabled.Website
The website endpoint, if the bucket is configured with a website. Returns an empty string if the bucket is not configured for static website hosting.
The domain of the website endpoint, if the bucket is configured with a website. Returns an empty string if not configured. Used to create Route 53 alias records.
Directory Bucket
The following outputs are only populated when
is_directory_bucket = true.Name of the directory bucket. Returns
null if no directory bucket was created.ARN of the directory bucket. Returns
null if no directory bucket was created.
