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

New Resources: r/aws_networkmanager_vpc_attachment & r/aws_networkmanager_attachment_acceptor #26227

Merged
merged 31 commits into from
Aug 16, 2022

Conversation

drewmullen
Copy link
Collaborator

@drewmullen drewmullen commented Aug 10, 2022

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
Closes #26226.

Relates #25835.

Output from acceptance testing:

$ make testacc TESTS=TestAccNetworkManagerVpcAttachment PKG=networkmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerVpcAttachment'  -timeout 180m
=== RUN   TestAccNetworkManagerVpcAttachment_basic
=== PAUSE TestAccNetworkManagerVpcAttachment_basic
=== RUN   TestAccNetworkManagerVpcAttachment_tags
=== PAUSE TestAccNetworkManagerVpcAttachment_tags
=== CONT  TestAccNetworkManagerVpcAttachment_basic
=== CONT  TestAccNetworkManagerVpcAttachment_tags
--- PASS: TestAccNetworkManagerVpcAttachment_tags (1394.03s)
--- PASS: TestAccNetworkManagerVpcAttachment_basic (1623.94s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1627.529s
...

Notes

  • Accepting an attachment is required in order to delete the attachment. Attachments may not be deleted while they have a pending state AttachmentStatePendingTagAcceptance or AttachmentStatePendingAttachmentAcceptance
  • Tests for vpc-attachment have be put into the testfile for aws_networkmanager_attachment_acceptor because of the above requirement and because they are effectively the same tests required
  • There is currently a bug regarding updating the argument ipv6_support. It is not possible to currently update alone, must be updated with subnet_arn

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/networkmanager Issues and PRs that pertain to the networkmanager service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Aug 10, 2022
@drewmullen drewmullen force-pushed the f-networkmanager-vpc-attachment branch from 6da5dcd to f11c196 Compare August 11, 2022 02:47
@drewmullen
Copy link
Collaborator Author

$ make testacc TESTS=TestAccNetworkManagerAttachmentAcceptor PKG=networkmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerAttachmentAcceptor'  -timeout 180m
=== RUN   TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic
=== PAUSE TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic
=== RUN   TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentTags
=== PAUSE TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentTags
=== CONT  TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic
=== CONT  TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentTags
--- PASS: TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentTags (1247.46s)
--- PASS: TestAccNetworkManagerAttachmentAcceptor_vpcAttachmentBasic (1403.50s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1406.898s

.changelog/26227.txt Outdated Show resolved Hide resolved
@drewmullen
Copy link
Collaborator Author

$ make testacc TESTS=TestAccNetworkManagerAttachmentAccepter PKG=networkmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerAttachmentAccepter'  -timeout 180m
=== RUN   TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
=== PAUSE TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
=== RUN   TestAccNetworkManagerAttachmentAccepter_vpcAttachmentTags
=== PAUSE TestAccNetworkManagerAttachmentAccepter_vpcAttachmentTags
=== CONT  TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
=== CONT  TestAccNetworkManagerAttachmentAccepter_vpcAttachmentTags
--- PASS: TestAccNetworkManagerAttachmentAccepter_vpcAttachmentTags (1301.31s)
--- PASS: TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic (1427.20s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1431.028s

@drewmullen drewmullen force-pushed the f-networkmanager-vpc-attachment branch from 2bae08f to 4d5fe8b Compare August 11, 2022 16:35
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

a few small changes requested

internal/service/networkmanager/vpc_attachment_test.go Outdated Show resolved Hide resolved
@drewmullen
Copy link
Collaborator Author

drewmullen commented Aug 15, 2022

$ make testacc TESTS=TestAccNetworkManagerVPCAttachment PKG=networkmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerVPCAttachment'  -timeout 180m
=== RUN   TestAccNetworkManagerVPCAttachment_basic
=== PAUSE TestAccNetworkManagerVPCAttachment_basic
=== RUN   TestAccNetworkManagerVPCAttachment_updates
=== PAUSE TestAccNetworkManagerVPCAttachment_updates
=== RUN   TestAccNetworkManagerVPCAttachment_tags
=== PAUSE TestAccNetworkManagerVPCAttachment_tags
=== CONT  TestAccNetworkManagerVPCAttachment_basic
=== CONT  TestAccNetworkManagerVPCAttachment_tags
=== CONT  TestAccNetworkManagerVPCAttachment_updates
--- PASS: TestAccNetworkManagerVPCAttachment_basic (1216.44s)
--- PASS: TestAccNetworkManagerVPCAttachment_tags (1400.23s)
--- PASS: TestAccNetworkManagerVPCAttachment_updates (1470.83s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager     1474.600s

Tests for AttachmentAccepter

$ make testacc TESTS=TestAccNetworkManagerAttachmentAccepter PKG=networkmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkmanager/... -v -count 1 -parallel 20 -run='TestAccNetworkManagerAttachmentAccepter'  -timeout 180m
=== RUN   TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
=== PAUSE TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
=== CONT  TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic
--- PASS: TestAccNetworkManagerAttachmentAccepter_vpcAttachmentBasic (1165.31s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager	1169.302s

Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 16, 2022
…se'.

Acceptance test output:

% make testacc TESTARGS='-run=TestAccNetworkManagerVPCAttachment_basic' 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=TestAccNetworkManagerVPCAttachment_basic -timeout 180m
=== RUN   TestAccNetworkManagerVPCAttachment_basic
=== PAUSE TestAccNetworkManagerVPCAttachment_basic
=== CONT  TestAccNetworkManagerVPCAttachment_basic
--- PASS: TestAccNetworkManagerVPCAttachment_basic (814.61s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager	818.609s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccNetworkManagerVPCAttachment_' 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=TestAccNetworkManagerVPCAttachment_ -timeout 180m
=== RUN   TestAccNetworkManagerVPCAttachment_basic
=== PAUSE TestAccNetworkManagerVPCAttachment_basic
=== RUN   TestAccNetworkManagerVPCAttachment_disappears
=== PAUSE TestAccNetworkManagerVPCAttachment_disappears
=== RUN   TestAccNetworkManagerVPCAttachment_tags
=== PAUSE TestAccNetworkManagerVPCAttachment_tags
=== RUN   TestAccNetworkManagerVPCAttachment_update
=== PAUSE TestAccNetworkManagerVPCAttachment_update
=== CONT  TestAccNetworkManagerVPCAttachment_basic
=== CONT  TestAccNetworkManagerVPCAttachment_tags
--- PASS: TestAccNetworkManagerVPCAttachment_basic (849.56s)
=== CONT  TestAccNetworkManagerVPCAttachment_disappears
--- PASS: TestAccNetworkManagerVPCAttachment_tags (1123.64s)
=== CONT  TestAccNetworkManagerVPCAttachment_update
--- PASS: TestAccNetworkManagerVPCAttachment_disappears (854.64s)
--- PASS: TestAccNetworkManagerVPCAttachment_update (1284.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager	2412.205s
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=TestAccNetworkManagerVPCAttachment_' 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=TestAccNetworkManagerVPCAttachment_ -timeout 180m
=== RUN   TestAccNetworkManagerVPCAttachment_basic
=== PAUSE TestAccNetworkManagerVPCAttachment_basic
=== RUN   TestAccNetworkManagerVPCAttachment_disappears
=== PAUSE TestAccNetworkManagerVPCAttachment_disappears
=== RUN   TestAccNetworkManagerVPCAttachment_tags
=== PAUSE TestAccNetworkManagerVPCAttachment_tags
=== RUN   TestAccNetworkManagerVPCAttachment_update
=== PAUSE TestAccNetworkManagerVPCAttachment_update
=== CONT  TestAccNetworkManagerVPCAttachment_basic
=== CONT  TestAccNetworkManagerVPCAttachment_tags
--- PASS: TestAccNetworkManagerVPCAttachment_basic (849.56s)
=== CONT  TestAccNetworkManagerVPCAttachment_disappears
--- PASS: TestAccNetworkManagerVPCAttachment_tags (1123.64s)
=== CONT  TestAccNetworkManagerVPCAttachment_update
--- PASS: TestAccNetworkManagerVPCAttachment_disappears (854.64s)
--- PASS: TestAccNetworkManagerVPCAttachment_update (1284.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkmanager	2412.205s

@ewbankkit
Copy link
Contributor

@drewmullen Thanks for the contribution 🎉 👏.
Overall this is great.
I made a couple of minor adjustments:

  • Removed the aws_networkmanager_attachment_accepter acceptance tests as the resource is being tested as part of aws_networkmanager_vpc_attachment tests
  • Implemented resource Read for aws_networkmanager_attachment_accepter

@ewbankkit ewbankkit merged commit 650064a into hashicorp:main Aug 16, 2022
@github-actions github-actions bot added this to the v4.27.0 milestone Aug 16, 2022
@drewmullen drewmullen deleted the f-networkmanager-vpc-attachment branch August 16, 2022 20:04
@github-actions
Copy link

This functionality has been released in v4.27.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 22, 2022
@justinretzolk justinretzolk added the partner Contribution from a partner. label May 16, 2024
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. new-resource Introduces a new resource. partner Contribution from a partner. provider Pertains to the provider itself, rather than any interaction with AWS. service/networkmanager Issues and PRs that pertain to the networkmanager service. size/XL 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.

r/aws_networkmanager_vpc_attachment
4 participants