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

Wrong S3 bucket website_endpoint and website_domain attributes in China regions #9378

Closed
vivanov-dp opened this issue Jul 17, 2019 · 3 comments · Fixed by #9444
Closed

Wrong S3 bucket website_endpoint and website_domain attributes in China regions #9378

vivanov-dp opened this issue Jul 17, 2019 · 3 comments · Fixed by #9444
Assignees
Labels
bug Addresses a defect in current functionality. partition/aws-cn Pertains to the aws-cn partition. service/s3 Issues and PRs that pertain to the s3 service.
Milestone

Comments

@vivanov-dp
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.4
provider.aws v2.19.0

Affected Resource(s)

  • aws_s3_bucket

Terraform Configuration Files

A simple bucket:

provider "aws" {
    region      = "cn-northwest-1"
}

resource "aws_s3_bucket" "website_build" {
    bucket = local.bucket_name
    policy = data.template_file.policy_bucket_public.rendered

    website {
        index_document = "index.html"
    }

    tags = {
        Name = "${var.prefix}-website-build"
    }
}

Expected Behavior

The proper endpoint is http://<bucket>.s3-website.cn-northwest-1.amazonaws.com.cn

Actual Behavior

$ terraform.exe console
?[J> aws_s3_bucket.website_build.website_endpoint
<bucket>.s3-website.cn-northwest-1.amazonaws.com

?[J> aws_s3_bucket.website_build.website_domain
s3-website.cn-northwest-1.amazonaws.com

?[J> aws_s3_bucket.website_build.bucket_regional_domain_name
<bucket>.s3.cn-northwest-1.amazonaws.com.cn

Terraform is missing the .cn at the end of the domain for the website_endpoint and website_domain attributes. For comparison - bucket_regional_domain_name has a proper value.

Steps to Reproduce

  1. terraform apply
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 17, 2019
@bflad bflad added bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service. partition/aws-cn Pertains to the aws-cn partition. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 18, 2019
@bflad bflad self-assigned this Jul 23, 2019
@bflad bflad added this to the v2.21.0 milestone Jul 24, 2019
@bflad
Copy link
Contributor

bflad commented Jul 24, 2019

The fix for this has been merged and will release with version 2.21.0 of the Terraform AWS Provider, later this week. 👍 Thanks to @antonio-osorio for the implementation.

@bflad
Copy link
Contributor

bflad commented Jul 26, 2019

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

For further feature requests, documentation updates, or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. partition/aws-cn Pertains to the aws-cn partition. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
2 participants