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

d/aws_route53_resolver_rule: Don't retrieve tags for rules 'SHARED_WITH_ME' #10348

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Oct 2, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #10211

Release note for CHANGELOG:

data-source/aws_route53_resolver_rule: Don't retrieve tags for rules shared with the AWS account that owns the data source

Output from acceptance testing:

$ AWS_ALTERNATE_ACCESS_KEY_ID=AAAAAAAAAAAAAAAAAAAA AWS_ALTERNATE_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsRoute53ResolverRule_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 1 -run=TestAccDataSourceAwsRoute53ResolverRule_ -timeout 120m
go: finding github.com/terraform-providers/terraform-provider-tls v2.1.1+incompatible
go: finding github.com/terraform-providers/terraform-provider-tls v2.1.1+incompatible
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_basic
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_basic
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_ResolverEndpointIdWithTags
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_ResolverEndpointIdWithTags
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_basic
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_basic (41.90s)
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe (218.40s)
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedByMe (227.76s)
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_ResolverEndpointIdWithTags
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_ResolverEndpointIdWithTags (244.33s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	732.452s

@ewbankkit ewbankkit requested a review from a team October 2, 2019 17:57
@ghost ghost added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 2, 2019
@ewbankkit ewbankkit force-pushed the issue-10211 branch 3 times, most recently from e3bc7cf to 9f98b6d Compare October 3, 2019 18:59
@ewbankkit
Copy link
Contributor Author

$ AWS_ALTERNATE_ACCESS_KEY_ID=AAAAAAAAAAAAAAAAAAAA AWS_ALTERNATE_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make testacc TEST=./aws/ TESTARGS='-run=TestAccDataSourceAwsRoute53ResolverRule__Shared'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 1 -run=TestAccDataSourceAwsRoute53ResolverRule_Shared -timeout 120m
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
=== RUN   TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
=== PAUSE TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_SharedByMe
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedByMe (224.69s)
=== CONT  TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe (327.07s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	551.873s

Requires that the 2 accounts are in the same AWS Organization and that RAM Sharing with AWS Organizations is enabled.
I need to add PreCheck methods for this.

@ewbankkit
Copy link
Contributor Author

Ended up using the same pattern as in aws/resource_aws_ec2_transit_gateway_vpc_attachment_test.go:

data "aws_organizations_organization" "test" {}

resource "aws_ram_principal_association" "test" {
  principal          = "${data.aws_organizations_organization.test.arn}"
  resource_share_arn = "${aws_ram_resource_share.test.arn}"
}

@ewbankkit ewbankkit changed the title [WIP] d/aws_route53_resolver_rule: Don't retrieve tags for rules 'SHARED_WITH_ME' d/aws_route53_resolver_rule: Don't retrieve tags for rules 'SHARED_WITH_ME' Oct 4, 2019
@dbektas
Copy link

dbektas commented Oct 22, 2019

any timeline on when is this gonna be merged?

@bflad bflad added bug Addresses a defect in current functionality. service/route53resolver Issues and PRs that pertain to the route53resolver service. labels Nov 2, 2019
@bflad bflad added this to the v2.35.0 milestone Nov 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.

This looks good, thanks for the fix and additional testing, @ewbankkit 🚀

--- PASS: TestAccDataSourceAwsRoute53ResolverRule_basic (29.29s)
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_ResolverEndpointIdWithTags (194.42s)
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedByMe (192.54s)
--- PASS: TestAccDataSourceAwsRoute53ResolverRules_basic (7.87s)
--- PASS: TestAccDataSourceAwsRoute53ResolverRule_SharedWithMe (185.97s)
--- PASS: TestAccDataSourceAwsRoute53ResolverRules_ResolverEndpointId (193.63s)

@bflad bflad merged commit 28038b2 into hashicorp:master Nov 4, 2019
bflad added a commit that referenced this pull request Nov 4, 2019
bflad added a commit that referenced this pull request Nov 4, 2019
bflad added a commit that referenced this pull request Nov 4, 2019
* provider: Hashibot issue/PR matching for CloudTrail should not include trailing underscore

Reference: #10730

The CloudTrail Trail resource is named just `aws_cloudtrail`.

* provider: Hashibot pull request labeling for route53resolver should include underscore

Reference: #10348

* provider: Add missing pull request labeling for qldb

Reference: #10394

* provider: Fix hashibot pull request labeling for athena

Reference: #10609

* provider: Ensure hashibot labeling for apigateway catches aws_api_gateway_vpc_link

Reference: #10561
@ewbankkit ewbankkit deleted the issue-10211 branch November 4, 2019 22:24
@ghost
Copy link

ghost commented Nov 7, 2019

This has been released in version 2.35.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 29, 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 29, 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. service/route53resolver Issues and PRs that pertain to the route53resolver service. size/L 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.

aws_route53_resolver_rule data lookup tag error
3 participants