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

fix: Skip listing tags on aws_vpclattice_service_network data source when shared via RAM #32939

Merged
merged 7 commits into from
Aug 10, 2023

Conversation

bryantbiggs
Copy link
Contributor

@bryantbiggs bryantbiggs commented Aug 9, 2023

Relations

Closes #32938.
Relates #26695.

References

Output from Acceptance Testing

make testacc TESTARGS='-run=TestAccVPCLatticeServiceNetwork' PKG=vpclattice ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceNetwork -timeout 180m
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_basic
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_basic
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_basic
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_basic
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_arn
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_arn
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_tags
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_tags
=== RUN   TestAccVPCLatticeServiceNetwork_basic
=== PAUSE TestAccVPCLatticeServiceNetwork_basic
=== RUN   TestAccVPCLatticeServiceNetwork_disappears
=== PAUSE TestAccVPCLatticeServiceNetwork_disappears
=== RUN   TestAccVPCLatticeServiceNetwork_full
=== PAUSE TestAccVPCLatticeServiceNetwork_full
=== RUN   TestAccVPCLatticeServiceNetwork_tags
=== PAUSE TestAccVPCLatticeServiceNetwork_tags
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_basic
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_full
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_basic (39.14s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_tags (149.51s)
=== CONT  TestAccVPCLatticeServiceNetwork_disappears
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_full (218.81s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetwork_disappears (32.55s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_disappears (110.73s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_arn (186.19s)
=== CONT  TestAccVPCLatticeServiceNetwork_full
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_basic (98.01s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetwork_full (43.06s)
=== CONT  TestAccVPCLatticeServiceNetwork_basic
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_disappears (47.09s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetwork_basic (42.71s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_arn (53.92s)
=== CONT  TestAccVPCLatticeServiceNetwork_tags
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_tags (111.34s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_basic (55.63s)
--- PASS: TestAccVPCLatticeServiceNetwork_tags (101.55s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	648.799s
...

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/vpclattice Issues and PRs that pertain to the vpclattice service. labels Aug 9, 2023
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Aug 9, 2023
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 9, 2023
@ewbankkit
Copy link
Contributor

@bryantbiggs Thanks for looking into this 👏.
Removing the tags attributes would be a breaking change.
We had a similar issue with shared AppMesh resources -- take a look at e.g. internal/service/appmesh/mesh_data_source.go for how to determine whether or not to call listTags.

@bryantbiggs
Copy link
Contributor Author

make testacc TESTARGS='-run=TestAccVPCLatticeServiceNetwork' PKG=vpclattice ACCTEST_PARALLELISM=2               
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceNetwork -timeout 180m
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_basic
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_basic
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_tags
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_tags
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_basic
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_basic
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_arn
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_arn
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
=== RUN   TestAccVPCLatticeServiceNetworkServiceAssociation_tags
=== PAUSE TestAccVPCLatticeServiceNetworkServiceAssociation_tags
=== RUN   TestAccVPCLatticeServiceNetwork_basic
=== PAUSE TestAccVPCLatticeServiceNetwork_basic
=== RUN   TestAccVPCLatticeServiceNetwork_disappears
=== PAUSE TestAccVPCLatticeServiceNetwork_disappears
=== RUN   TestAccVPCLatticeServiceNetwork_full
=== PAUSE TestAccVPCLatticeServiceNetwork_full
=== RUN   TestAccVPCLatticeServiceNetwork_tags
=== PAUSE TestAccVPCLatticeServiceNetwork_tags
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_basic
=== CONT  TestAccVPCLatticeServiceNetwork_full
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_basic (39.01s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetwork_full (44.32s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_disappears (100.75s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_full
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_tags (160.48s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_full (100.93s)
=== CONT  TestAccVPCLatticeServiceNetwork_disappears
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_disappears (46.57s)
=== CONT  TestAccVPCLatticeServiceNetwork_basic
--- PASS: TestAccVPCLatticeServiceNetwork_disappears (38.10s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetwork_basic (43.31s)
=== CONT  TestAccVPCLatticeServiceNetwork_tags
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_tags (112.94s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetwork_tags (101.11s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_basic (52.36s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_arn (51.14s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_basic (107.87s)
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_tags
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_tags (37.99s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_arn (97.34s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	596.804s

@bryantbiggs bryantbiggs changed the title fix: Remove tags from aws_vpclattice_service and aws_vpclattice_service_network data sources fix: Skip listing tags on aws_vpclattice_service_network data source when shared via RAM Aug 9, 2023
@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 9, 2023
Acceptance test output:

% make testacc TESTARGS='-run=TestAccVPCLatticeServiceNetworkDataSource_' PKG=vpclattice ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceNetworkDataSource_ -timeout 180m
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_basic
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_basic
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_basic
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_basic (23.41s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	28.927s
…kDataSource_shared'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccVPCLatticeServiceNetworkDataSource_shared' PKG=vpclattice ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceNetworkDataSource_shared -timeout 180m
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_shared
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_shared
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_shared
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_shared (40.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	45.992s
@ewbankkit ewbankkit self-assigned this Aug 10, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 10, 2023
Acceptance test output:

% make testacc TESTARGS='-run=TestAccVPCLatticeServiceDataSource_' PKG=vpclattice ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceDataSource_ -timeout 180m
=== RUN   TestAccVPCLatticeServiceDataSource_basic
=== PAUSE TestAccVPCLatticeServiceDataSource_basic
=== RUN   TestAccVPCLatticeServiceDataSource_byName
=== PAUSE TestAccVPCLatticeServiceDataSource_byName
=== CONT  TestAccVPCLatticeServiceDataSource_basic
=== CONT  TestAccVPCLatticeServiceDataSource_byName
--- PASS: TestAccVPCLatticeServiceDataSource_basic (28.19s)
--- PASS: TestAccVPCLatticeServiceDataSource_byName (28.28s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	33.556s
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 TESTARGS='-run=TestAccVPCLatticeServiceDataSource_' PKG=vpclattice ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceDataSource_ -timeout 180m
=== RUN   TestAccVPCLatticeServiceDataSource_basic
=== PAUSE TestAccVPCLatticeServiceDataSource_basic
=== RUN   TestAccVPCLatticeServiceDataSource_byName
=== PAUSE TestAccVPCLatticeServiceDataSource_byName
=== RUN   TestAccVPCLatticeServiceDataSource_shared
=== PAUSE TestAccVPCLatticeServiceDataSource_shared
=== CONT  TestAccVPCLatticeServiceDataSource_basic
=== CONT  TestAccVPCLatticeServiceDataSource_shared
--- PASS: TestAccVPCLatticeServiceDataSource_basic (29.13s)
=== CONT  TestAccVPCLatticeServiceDataSource_byName
--- PASS: TestAccVPCLatticeServiceDataSource_shared (46.69s)
--- PASS: TestAccVPCLatticeServiceDataSource_byName (30.12s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	64.778s
% make testacc TESTARGS='-run=TestAccVPCLatticeServiceNetworkDataSource_' PKG=vpclattice ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 2  -run=TestAccVPCLatticeServiceNetworkDataSource_ -timeout 180m
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_basic
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_basic
=== RUN   TestAccVPCLatticeServiceNetworkDataSource_shared
=== PAUSE TestAccVPCLatticeServiceNetworkDataSource_shared
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_basic
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_shared
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_basic (26.81s)
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_shared (44.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	49.759s

@ewbankkit
Copy link
Contributor

@bryantbiggs Thanks for the contribution 🎉 👏.
I added some tests and added the same logic to the aws_vpclattice_service data source.

@bryantbiggs
Copy link
Contributor Author

thank you - I appreciate it!

@ewbankkit ewbankkit merged commit 9e2fbfb into hashicorp:main Aug 10, 2023
34 checks passed
@github-actions github-actions bot added this to the v5.12.0 milestone Aug 10, 2023
@bryantbiggs bryantbiggs deleted the fix/vpc-lattice-tags branch August 10, 2023 17:07
@github-actions
Copy link

This functionality has been released in v5.12.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

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 Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/vpclattice Issues and PRs that pertain to the vpclattice service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_vpclattice_service_network and aws_vpclattice_service do not return tags in the describe API call
2 participants