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

[Enhancement] Add NO_ENCAP support to aws_networkmanager_connect_attachment #34109

Conversation

ddericco
Copy link
Contributor

@ddericco ddericco commented Oct 25, 2023

Description

  • aws_networkmanager_connect_attachment: Add support for the NO_ENCAP protocol option required for tunnel-less connect.
  • aws_networkmanager_connect_peer: Add subnet_arn attribute to support tunnel-less Connect attachments
  • aws_networkmanager_connect_peer: Mark inside_cidr_blocks argument as optional to support tunnel-less Connect attachments

This also updates the existing acceptance tests to check for the protocol type.

Relations

Closes #34101

References

Launch announcement: https://aws.amazon.com/about-aws/whats-new/2023/10/aws-cloud-wan-tunnel-less-high-performant-global-sd-wans/
API reference: https://docs.aws.amazon.com/networkmanager/latest/APIReference/API_ConnectAttachmentOptions.html#networkmanager-Type-ConnectAttachmentOptions-Protocol

Output from Acceptance Testing

$ make testacc TESTS='TestAccNetworkManagerConnectAttachment_' PKG=networkmanager 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerConnectAttachment_'  -timeout 360m
=== RUN   TestAccNetworkManagerConnectAttachment_basic
=== PAUSE TestAccNetworkManagerConnectAttachment_basic
=== RUN   TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
=== PAUSE TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
=== RUN   TestAccNetworkManagerConnectAttachment_disappears
=== PAUSE TestAccNetworkManagerConnectAttachment_disappears
=== RUN   TestAccNetworkManagerConnectAttachment_protocolNoEncap
=== PAUSE TestAccNetworkManagerConnectAttachment_protocolNoEncap
=== RUN   TestAccNetworkManagerConnectAttachment_tags
=== PAUSE TestAccNetworkManagerConnectAttachment_tags
=== CONT  TestAccNetworkManagerConnectAttachment_basic
=== CONT  TestAccNetworkManagerConnectAttachment_protocolNoEncap
=== CONT  TestAccNetworkManagerConnectAttachment_tags
=== CONT  TestAccNetworkManagerConnectAttachment_disappears
=== CONT  TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
--- PASS: TestAccNetworkManagerConnectAttachment_tags (1055.17s)
--- PASS: TestAccNetworkManagerConnectAttachment_protocolNoEncap (1132.04s)
--- PASS: TestAccNetworkManagerConnectAttachment_basic_NoDependsOn (1171.50s)
--- PASS: TestAccNetworkManagerConnectAttachment_basic (1199.77s)
--- PASS: TestAccNetworkManagerConnectAttachment_disappears (1241.14s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1246.530s

$ make testacc TESTS='TestAccNetworkManagerConnectPeer_' PKG=networkmanager ACCTEST_PARALLELISM=4 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 4 -run='TestAccNetworkManagerConnectPeer_'  -timeout 360m
=== RUN   TestAccNetworkManagerConnectPeer_basic
=== PAUSE TestAccNetworkManagerConnectPeer_basic
=== RUN   TestAccNetworkManagerConnectPeer_noDependsOn
=== PAUSE TestAccNetworkManagerConnectPeer_noDependsOn
=== RUN   TestAccNetworkManagerConnectPeer_subnetArn
=== PAUSE TestAccNetworkManagerConnectPeer_subnetArn
=== RUN   TestAccNetworkManagerConnectPeer_tags
=== PAUSE TestAccNetworkManagerConnectPeer_tags
=== CONT  TestAccNetworkManagerConnectPeer_basic
=== CONT  TestAccNetworkManagerConnectPeer_subnetArn
=== CONT  TestAccNetworkManagerConnectPeer_noDependsOn
=== CONT  TestAccNetworkManagerConnectPeer_tags
--- PASS: TestAccNetworkManagerConnectPeer_basic (1461.53s)
--- PASS: TestAccNetworkManagerConnectPeer_tags (1483.78s)
--- PASS: TestAccNetworkManagerConnectPeer_noDependsOn (1515.02s)
--- PASS: TestAccNetworkManagerConnectPeer_subnetArn (1522.34s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1525.729s

@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 size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/networkmanager Issues and PRs that pertain to the networkmanager service. labels Oct 25, 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 Oct 25, 2023
@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 Oct 25, 2023
@ddericco ddericco marked this pull request as ready for review October 25, 2023 15:56
@ewbankkit
Copy link
Contributor

@ddericco Thanks for the contribution 🎉 👏.
To close #34101 we will need to add subnet_arn to aws_networkmanager_connect_peer -- https://docs.aws.amazon.com/networkmanager/latest/APIReference/API_CreateConnectPeer.html#networkmanager-CreateConnectPeer-request-SubnetArn.

@ewbankkit ewbankkit self-assigned this Oct 25, 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 Oct 25, 2023
@ddericco
Copy link
Contributor Author

@ewbankkit good catch - will work on including that in this PR

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 26, 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 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccNetworkManagerConnectAttachment_\|TestAccNetworkManagerConnectPeer_' PKG=networkmanager ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 2  -run=TestAccNetworkManagerConnectAttachment_\|TestAccNetworkManagerConnectPeer_ -timeout 720m
=== RUN   TestAccNetworkManagerConnectAttachment_basic
=== PAUSE TestAccNetworkManagerConnectAttachment_basic
=== RUN   TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
=== PAUSE TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
=== RUN   TestAccNetworkManagerConnectAttachment_disappears
=== PAUSE TestAccNetworkManagerConnectAttachment_disappears
=== RUN   TestAccNetworkManagerConnectAttachment_protocolNoEncap
=== PAUSE TestAccNetworkManagerConnectAttachment_protocolNoEncap
=== RUN   TestAccNetworkManagerConnectAttachment_tags
=== PAUSE TestAccNetworkManagerConnectAttachment_tags
=== RUN   TestAccNetworkManagerConnectPeer_basic
=== PAUSE TestAccNetworkManagerConnectPeer_basic
=== RUN   TestAccNetworkManagerConnectPeer_noDependsOn
=== PAUSE TestAccNetworkManagerConnectPeer_noDependsOn
=== RUN   TestAccNetworkManagerConnectPeer_subnetARN
=== PAUSE TestAccNetworkManagerConnectPeer_subnetARN
=== RUN   TestAccNetworkManagerConnectPeer_tags
=== PAUSE TestAccNetworkManagerConnectPeer_tags
=== CONT  TestAccNetworkManagerConnectAttachment_basic
=== CONT  TestAccNetworkManagerConnectPeer_basic
--- PASS: TestAccNetworkManagerConnectAttachment_basic (1199.16s)
=== CONT  TestAccNetworkManagerConnectPeer_subnetARN
--- PASS: TestAccNetworkManagerConnectPeer_basic (1396.01s)
=== CONT  TestAccNetworkManagerConnectPeer_tags
--- PASS: TestAccNetworkManagerConnectPeer_subnetARN (1564.75s)
=== CONT  TestAccNetworkManagerConnectAttachment_protocolNoEncap
--- PASS: TestAccNetworkManagerConnectPeer_tags (1403.90s)
=== CONT  TestAccNetworkManagerConnectAttachment_tags
--- PASS: TestAccNetworkManagerConnectAttachment_tags (1017.96s)
=== CONT  TestAccNetworkManagerConnectAttachment_disappears
--- PASS: TestAccNetworkManagerConnectAttachment_protocolNoEncap (1079.16s)
=== CONT  TestAccNetworkManagerConnectPeer_noDependsOn
--- PASS: TestAccNetworkManagerConnectAttachment_disappears (1126.20s)
=== CONT  TestAccNetworkManagerConnectAttachment_basic_NoDependsOn
--- PASS: TestAccNetworkManagerConnectPeer_noDependsOn (1450.98s)
--- PASS: TestAccNetworkManagerConnectAttachment_basic_NoDependsOn (953.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager	5903.443s

@ewbankkit
Copy link
Contributor

@ddericco Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit e3609fb into hashicorp:main Oct 27, 2023
43 checks passed
@github-actions github-actions bot added this to the v5.24.0 milestone Oct 27, 2023
Copy link

github-actions bot commented Nov 2, 2023

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

Copy link

github-actions bot commented Dec 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 Dec 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. partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/networkmanager Issues and PRs that pertain to the networkmanager 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 Cloud WAN Tunnel-less connect
3 participants