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

Return a different cloudfront hosted_zone_id if in AWS CN #21943

Merged
merged 4 commits into from
Dec 1, 2021

Conversation

deamwork
Copy link
Contributor

@deamwork deamwork commented Nov 29, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #15223, #18169

Output from acceptance testing:

  • Not available since there's no acceptance testing for now.

This PR will return a fixed hosted_zone_id of Route53 with Cloudfront when the user is operating in the AWS China region.

You can review the guidance provided by AWS CN here: https://docs.amazonaws.cn/en_us/aws/latest/userguide/route53.html

I did some tests (acceptance tests are not included) and make test looks fine.

This is my first PR/contribution in this repo. If there's anything I should do, please comment here. Huge thanks.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. service/cloudfront Issues and PRs that pertain to the cloudfront service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 29, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @deamwork 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 1, 2021
@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 1, 2021
@ewbankkit
Copy link
Contributor

@deamwork Thanks for the contribution 🎉 👏.
Overall it looks great.
I simplified the code to use the endpoints.PartitionForRegion function instead of testing the AWS Region prefix,
I also removed the acceptance tests as the maintainers have no way currently of testing in the China partition.

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTS=TestAccCloudFrontDistributionDataSource_basic PKG=cloudfront
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudfront/... -v -count 1 -parallel 20 -run='TestAccCloudFrontDistributionDataSource_basic' -timeout 180m
=== RUN   TestAccCloudFrontDistributionDataSource_basic
=== PAUSE TestAccCloudFrontDistributionDataSource_basic
=== CONT  TestAccCloudFrontDistributionDataSource_basic
--- PASS: TestAccCloudFrontDistributionDataSource_basic (320.90s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cloudfront	325.935s

@ewbankkit ewbankkit merged commit ca66743 into hashicorp:main Dec 1, 2021
@github-actions github-actions bot added this to the v3.68.0 milestone Dec 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

This functionality has been released in v3.68.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 or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 4, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cloudfront Issues and PRs that pertain to the cloudfront 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.

cloudfront.hosted_zone_id is wrong in China
2 participants