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

ds/aws_prefix_list: Fix hardcoded regions #16521

Closed
wants to merge 1 commit into from

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Dec 2, 2020

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 #12995 Phase 2
Relates #14109

Release note for CHANGELOG:

NONE

Output from acceptance testing (GovCloud):

--- PASS: TestAccDataSourceAwsPrefixList_basic (14.91s)
--- PASS: TestAccDataSourceAwsPrefixList_filter (15.40s)

Output from acceptance testing (commercial):

--- PASS: TestAccDataSourceAwsPrefixList_basic (9.79s)
--- PASS: TestAccDataSourceAwsPrefixList_filter (10.31s)

@YakDriver YakDriver requested a review from a team as a code owner December 2, 2020 01:33
@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 2, 2020
@YakDriver YakDriver added the partition/aws-us-gov Pertains to the aws-us-gov partition. label Dec 2, 2020
@bflad bflad self-assigned this Dec 2, 2020
bflad
bflad previously requested changes Dec 2, 2020
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.

Looking real good, just some suggestions to further handle partition differences now and later. 👍

aws/data_source_aws_prefix_list_test.go Outdated Show resolved Hide resolved
aws/data_source_aws_prefix_list_test.go Outdated Show resolved Hide resolved
aws/data_source_aws_prefix_list_test.go Outdated Show resolved Hide resolved
aws/data_source_aws_prefix_list_test.go Outdated Show resolved Hide resolved

data "aws_prefix_list" "s3_by_name" {
name = "com.amazonaws.us-west-2.s3"
name = "com.amazonaws.${data.aws_region.current.name}.s3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, but might be good to add a reverse DNS prefix attribute to the aws_partition data source since it varies across partitions outside AWS Commercial and GovCloud (US).

Copy link
Member Author

Choose a reason for hiding this comment

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

Sort of related, there's also the issue of EC2 compute hostnames/domains. In #16582, I created resourceAwsEc2RegionalPrivateDnsSuffix() and resourceAwsEc2RegionalPublicDnsSuffix(). That approach is more clumsy than adding fields like ec2_private_compute_domain and ec2_public_compute_domain to aws_region. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

See #16638 for the DNS prefix

@YakDriver
Copy link
Member Author

Post adjust:

GovCloud:

--- PASS: TestAccDataSourceAwsPrefixList_basic (18.37s)
--- PASS: TestAccDataSourceAwsPrefixList_filter (18.37s)

us-west-2

--- PASS: TestAccDataSourceAwsPrefixList_basic (13.38s)
--- PASS: TestAccDataSourceAwsPrefixList_filter (13.54s)

@bflad
Copy link
Contributor

bflad commented Dec 21, 2020

I believe this was covered by #16739 👍

@bflad bflad closed this Dec 21, 2020
@bflad bflad deleted the t-gov-hardregion-prefix-list branch December 21, 2020 18:01
@ghost
Copy link

ghost commented Jan 21, 2021

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 as resolved and limited conversation to collaborators Jan 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants