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

Fixes an issue where the cname_prefix attribute isn't correctly read in region China #4485

Conversation

by-zhou
Copy link

@by-zhou by-zhou commented May 8, 2018

Fixes an issue where the cname_prefix attribute isn't correctly read China regions.

Basically as extension of a previous issue.
Elastic Beanstalk has a different domain name in China regions, which ends with eb.amazonaws.com.cn rather than the usual elasticbeanstalk.com (reference), so cname_prefix cannot be correctly read.

Changes proposed in this pull request:

  • Adapt the regex expression to match cname in resource_aws_elastic_beanstalk_environment.go to be able to take cname in domain eb.amazonaws.com.cn.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAvailabilityZones'

...

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label May 8, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk service. partition/aws-cn Pertains to the aws-cn partition. labels May 9, 2018
@bflad bflad added this to the v1.18.0 milestone May 9, 2018
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.

Thank you for this fix @pychoude! While I cannot directly test it, it does appear to be correct in the code and according to the documentation (we appreciate the links!)

In the China (Beijing) Region, environment domains generated by Elastic Beanstalk are formatted as follows, where * denotes the custom domain: *.cn-north-1.eb.amazonaws.com.cn. For more information, see Using Custom Domains with Elastic Beanstalk in the AWS Elastic Beanstalk Developer Guide. In the China (Ningxia) Region, environment domains generated by Elastic Beanstalk are formatted as follows, where * denotes the custom domain: *.cn-northwest-1.eb.amazonaws.com.cn. In the Ningxia Region, environment domains generated by Elastic Beanstalk are formatted as follows, where * denotes the custom domain: *.cn-northwest-1.eb.amazonaws.com.cn.

@bflad bflad merged commit 0bb54d3 into hashicorp:master May 9, 2018
bflad added a commit that referenced this pull request May 9, 2018
bflad added a commit that referenced this pull request May 9, 2018
@bflad
Copy link
Contributor

bflad commented May 10, 2018

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

@ghost
Copy link

ghost commented Apr 6, 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 Apr 6, 2020
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/elasticbeanstalk Issues and PRs that pertain to the elasticbeanstalk 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.

2 participants