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_vpclattice_service: Ability to find by service name #32177

Merged
merged 11 commits into from
Aug 2, 2023

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Jun 23, 2023

Description

Users can now find VPC Lattice service by service name in addition to service identifier.
So it is a lot easier to reference VPC Lattice service as a data source from other TF workspaces.
Because the service name is predictable, but the auto-assigned random service identifier is not.

Finding by name will cover most use cases since service names are unique (duplication is not allowed) and predictable.
So I will not implement "by tag" filter.

Relations

Closes #31864

References

https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/vpclattice#Client.ListServices

Output from Acceptance Testing

$ make testacc TESTS=TestAccVPCLatticeServiceDataSource_ PKG=vpclattice 

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/vpclattice/... -v -count 1 -parallel 20 -run='TestAccVPCLatticeServiceDataSource_'  -timeout 180m
=== RUN   TestAccVPCLatticeServiceDataSource_basic
=== PAUSE TestAccVPCLatticeServiceDataSource_basic
=== RUN   TestAccVPCLatticeServiceDataSource_find_by_attributes
=== PAUSE TestAccVPCLatticeServiceDataSource_find_by_attributes
=== CONT  TestAccVPCLatticeServiceDataSource_basic
=== CONT  TestAccVPCLatticeServiceDataSource_find_by_attributes
--- PASS: TestAccVPCLatticeServiceDataSource_basic (40.37s)
--- PASS: TestAccVPCLatticeServiceDataSource_find_by_attributes (60.22s)
PASS

@github-actions
Copy link

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 documentation Introduces or discusses updates to documentation. service/vpclattice Issues and PRs that pertain to the vpclattice service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Jun 23, 2023
@exoego exoego force-pushed the f-aws_vpclattice.source-31864 branch from d6da412 to e05e2d2 Compare June 23, 2023 01:55
@exoego exoego marked this pull request as ready for review June 23, 2023 01:59
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 23, 2023
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=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  TestAccVPCLatticeServiceNetworkVPCAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_basic (24.74s)
=== CONT  TestAccVPCLatticeServiceNetwork_basic
--- PASS: TestAccVPCLatticeServiceNetwork_basic (26.63s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_arn (67.98s)
=== CONT  TestAccVPCLatticeServiceNetwork_tags
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_basic (66.36s)
=== CONT  TestAccVPCLatticeServiceNetwork_full
--- PASS: TestAccVPCLatticeServiceNetwork_tags (60.75s)
=== CONT  TestAccVPCLatticeServiceNetwork_disappears
--- PASS: TestAccVPCLatticeServiceNetwork_full (27.27s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_full
--- PASS: TestAccVPCLatticeServiceNetwork_disappears (20.10s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_full (95.95s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_arn (65.28s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_tags
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_tags (187.88s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_disappears (60.73s)
=== CONT  TestAccVPCLatticeServiceNetworkDataSource_tags
--- PASS: TestAccVPCLatticeServiceNetworkDataSource_tags (51.00s)
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_tags (149.99s)
=== CONT  TestAccVPCLatticeServiceNetworkServiceAssociation_basic
--- PASS: TestAccVPCLatticeServiceNetworkServiceAssociation_basic (58.01s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_disappears (84.65s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	538.331s
% make testacc TESTARGS='-run=TestAccVPCLatticeService_' 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=TestAccVPCLatticeService_ -timeout 180m
=== RUN   TestAccVPCLatticeService_basic
=== PAUSE TestAccVPCLatticeService_basic
=== RUN   TestAccVPCLatticeService_disappears
=== PAUSE TestAccVPCLatticeService_disappears
=== RUN   TestAccVPCLatticeService_full
=== PAUSE TestAccVPCLatticeService_full
=== RUN   TestAccVPCLatticeService_tags
=== PAUSE TestAccVPCLatticeService_tags
=== CONT  TestAccVPCLatticeService_basic
=== CONT  TestAccVPCLatticeService_full
--- PASS: TestAccVPCLatticeService_basic (30.01s)
=== CONT  TestAccVPCLatticeService_disappears
--- PASS: TestAccVPCLatticeService_full (30.06s)
=== CONT  TestAccVPCLatticeService_tags
--- PASS: TestAccVPCLatticeService_disappears (22.89s)
--- PASS: TestAccVPCLatticeService_tags (62.55s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	97.638s
% 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.21s)
--- PASS: TestAccVPCLatticeServiceDataSource_byName (28.50s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice	33.658s

@ewbankkit
Copy link
Contributor

@exoego Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 6ff47a4 into hashicorp:main Aug 2, 2023
41 checks passed
@github-actions github-actions bot added this to the v5.11.0 milestone Aug 2, 2023
@exoego exoego deleted the f-aws_vpclattice.source-31864 branch August 2, 2023 21:21
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This functionality has been released in v5.11.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 Sep 3, 2023

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 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/vpclattice Issues and PRs that pertain to the vpclattice service. size/M 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.

[Bug]: data source aws_vpclattice.service can't search on anything but Service Identifier
3 participants