hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.71k stars 9.06k forks source link

Add data sources for S3 bucket encryption, versioning, lifecycle, etc #25483

Open mitchellrj opened 2 years ago

mitchellrj commented 2 years ago

Community Note

Description

Add data sources for S3 bucket configuration resources. There is currently no way to retrieve this information about a bucket. These are particularly useful for precondition and postcondition statements in shared modules.

New or Affected Resource(s)

Potential Terraform Configuration

For singleton configurations:

data "aws_s3_bucket_replication_configuration" "mybucket-replication" {
  bucket = "bucket.test.com"
}

For multiple named configurations:

data "aws_s3_bucket_analytics_configuration" "" {
  bucket = "bucket.test.com"
  id     = "my-analytics"
}

There are no cases of multiple unnamed configurations as far as I can tell.

github-actions[bot] commented 1 month ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

t3hG04T commented 1 month ago

Since the bot is threatening to close the issue: this is still a thing. I'd gladly replace my hacks with an actual data source.