Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add bucket_regional_domain_name to aws_s3_bucket Data Source #7765

Merged
merged 3 commits into from
Mar 4, 2019

Conversation

charlyx
Copy link
Contributor

@charlyx charlyx commented Feb 28, 2019

Hi again πŸ‘‹

Thanks again for your work! πŸ‘

This PR allows you to get bucket_regional_domain_name using a bucket data source.
I have updated the documentation accordingly.

Fix #7764

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/s3 Issues and PRs that pertain to the s3 service. documentation Introduces or discusses updates to documentation. labels Feb 28, 2019
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 4, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @charlyx πŸš€ Please note: adding this quick acceptance testing piece on merge to ensure its covered:

resource.TestCheckResourceAttr("data.aws_s3_bucket.bucket", "bucket_regional_domain_name", testAccBucketRegionalDomainName(rInt, region)),

Output from acceptance testing:

--- PASS: TestAccDataSourceS3Bucket_basic (29.54s)
--- PASS: TestAccDataSourceS3Bucket_website (33.76s)

@bflad bflad added this to the v2.1.0 milestone Mar 4, 2019
@bflad bflad merged commit 5a7fd8e into hashicorp:master Mar 4, 2019
bflad added a commit that referenced this pull request Mar 4, 2019
@charlyx charlyx deleted the data-s3-regional-domain-name branch March 4, 2019 20:20
@bflad
Copy link
Contributor

bflad commented Mar 8, 2019

This has been released in version 2.1.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@matthewduren
Copy link

This breaks bucket auto-naming - we are passing in bucket = "${var.bucket_name}" to an aws_s3_bucket resource, the bucket_name variable defaults to "", which formerly caused buckets to be named by terraform (ex terraform-20190983249872394800000001). After this update, bucket names are throwing a length error:

Error: module.my_bucket.aws_s3_bucket.main: expected length of bucket to be in the range (3 - 63), got 

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add bucket_regional_domain_name to aws_s3_bucket Data Source
3 participants