Skip to content

Commit 525f43c

Browse files
authored
feat: Add bucket versioning status as an output (#350)
1 parent a162988 commit 525f43c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ No modules.
280280

281281
| Name | Description |
282282
|------|-------------|
283+
| <a name="output_aws_s3_bucket_versioning_status"></a> [aws\_s3\_bucket\_versioning\_status](#output\_aws\_s3\_bucket\_versioning\_status) | The versioning status of the bucket. Will be 'Enabled', 'Suspended', or 'Disabled'. |
283284
| <a name="output_s3_bucket_arn"></a> [s3\_bucket\_arn](#output\_s3\_bucket\_arn) | The ARN of the bucket. Will be of format arn:aws:s3:::bucketname. |
284285
| <a name="output_s3_bucket_bucket_domain_name"></a> [s3\_bucket\_bucket\_domain\_name](#output\_s3\_bucket\_bucket\_domain\_name) | The bucket domain name. Will be of format bucketname.s3.amazonaws.com. |
285286
| <a name="output_s3_bucket_bucket_regional_domain_name"></a> [s3\_bucket\_bucket\_regional\_domain\_name](#output\_s3\_bucket\_bucket\_regional\_domain\_name) | 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. |

outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ output "s3_directory_bucket_arn" {
5757
description = "ARN of the directory bucket."
5858
value = try(aws_s3_directory_bucket.this[0].arn, null)
5959
}
60+
61+
output "aws_s3_bucket_versioning_status" {
62+
description = "The versioning status of the bucket. Will be 'Enabled', 'Suspended', or 'Disabled'."
63+
value = try(aws_s3_bucket_versioning.this[0].versioning_configuration[0].status, null)
64+
}

0 commit comments

Comments
 (0)