-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Adding aws_transit_gateway_connect and peers #22181
Conversation
2ab4204
to
1230717
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @steweg 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
6295137
to
e388913
Compare
20026fc
to
2212ae8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steweg This is really excellent work.
Couple of questions and some opportunities to improve user experience via validate
. I'm not going to say the CIDR range validations are required but if they're "easy enough" to implement then it would improve user experience.
Again - really great work
2212ae8
to
12a89a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 1 more thing IMO. good work
181a5ca
to
9d241e8
Compare
@steweg am I doing anything wrong here?
|
I think you have checkout old commit, which was having this bug. Can you double check? |
Ye. Correct, I had checkouted |
@steweg still running but getting a failure:
my goodness this takes a while! :D |
Yeah, the problem is that those tests are running in serial, not in parallel. When I was trying those tests by myself I have adjusted the code to actually run just those tests in parallel and max 5 tests in parallel (there was some limitation on AWS, which prevented more for my account)., but those changes are excluded from the commit Here is actual list of tests that I have tested by myself: New tests: Possible screw-ups/existing tests Each test is almost 800s, so it really takes time. For those that are failing. It doesn't seems to be problem of code or my commit, but rather AWS access (e.g. your account is not allowed for such operations, or the AWS region that you are using doesn't support such feature). Can you please cross-check with current master if those tests are working for you? |
…yID' and 'FindTransitGatewayByID'.
% make testacc TESTS=TestAccEC2TransitGateway_serial/Connect/basic PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGateway_serial/Connect/basic' -timeout 180m === RUN TestAccEC2TransitGateway_serial === RUN TestAccEC2TransitGateway_serial/ConnectPeer === RUN TestAccEC2TransitGateway_serial/ConnectPeer/basic === RUN TestAccEC2TransitGateway_serial/Connect === RUN TestAccEC2TransitGateway_serial/Connect/basic --- PASS: TestAccEC2TransitGateway_serial (1272.03s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer (829.36s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/basic (829.36s) --- PASS: TestAccEC2TransitGateway_serial/Connect (442.67s) --- PASS: TestAccEC2TransitGateway_serial/Connect/basic (442.67s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 1276.446s
Acceptance test output: % make testacc TESTS=TestAccEC2TransitGatewayDataSource_serial/Connect PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGatewayDataSource_serial/Connect' -timeout 180m === RUN TestAccEC2TransitGatewayDataSource_serial === RUN TestAccEC2TransitGatewayDataSource_serial/Connect === RUN TestAccEC2TransitGatewayDataSource_serial/Connect/Filter === RUN TestAccEC2TransitGatewayDataSource_serial/Connect/ID === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/ID === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/Filter --- PASS: TestAccEC2TransitGatewayDataSource_serial (2622.91s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/Connect (991.60s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/Connect/Filter (467.81s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/Connect/ID (523.79s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer (1631.31s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/ID (848.54s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/Filter (782.77s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 2632.103s
…K V2 'WithoutTimeout' signatures (hashicorp#15090).
…Create and Delete APIs.
% make testacc TESTS=TestAccEC2TransitGateway_serial/ConnectPeer/basic PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGateway_serial/ConnectPeer/basic' -timeout 180m === RUN TestAccEC2TransitGateway_serial === RUN TestAccEC2TransitGateway_serial/ConnectPeer === RUN TestAccEC2TransitGateway_serial/ConnectPeer/basic --- PASS: TestAccEC2TransitGateway_serial (965.08s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer (965.08s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/basic (965.08s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 968.957s
…ect_peer_id'. Acceptance test output: % make testacc TESTS=TestAccEC2TransitGatewayDataSource_serial/ConnectPeer PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGatewayDataSource_serial/ConnectPeer' -timeout 180m === RUN TestAccEC2TransitGatewayDataSource_serial === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/Filter === RUN TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/ID --- PASS: TestAccEC2TransitGatewayDataSource_serial (1597.37s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer (1597.37s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/Filter (815.37s) --- PASS: TestAccEC2TransitGatewayDataSource_serial/ConnectPeer/ID (782.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 1601.053s
…to handle "large" (4200000000–4294967294) ASNs. Acceptance test output: % make testacc TESTS=TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn PKG=ec2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn' -timeout 180m === RUN TestAccEC2TransitGateway_serial === RUN TestAccEC2TransitGateway_serial/ConnectPeer === RUN TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn --- PASS: TestAccEC2TransitGateway_serial (800.70s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer (800.69s) --- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn (800.69s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 804.916s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccEC2TransitGateway_serial/Connect PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2TransitGateway_serial/Connect' -timeout 180m
=== RUN TestAccEC2TransitGateway_serial
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/Tags
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/TransitGatewayAddress
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/basic
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/disappears
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn
=== RUN TestAccEC2TransitGateway_serial/ConnectPeer/InsideCidrBlocks
=== RUN TestAccEC2TransitGateway_serial/Connect
=== RUN TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTableAssociation
=== RUN TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled
=== RUN TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTablePropagation
=== RUN TestAccEC2TransitGateway_serial/Connect/basic
=== RUN TestAccEC2TransitGateway_serial/Connect/disappears
=== RUN TestAccEC2TransitGateway_serial/Connect/Tags
--- PASS: TestAccEC2TransitGateway_serial (7843.91s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer (4904.07s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/Tags (879.97s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/TransitGatewayAddress (779.99s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/basic (782.07s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/disappears (830.77s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/BgpAsn (791.18s)
--- PASS: TestAccEC2TransitGateway_serial/ConnectPeer/InsideCidrBlocks (840.09s)
--- PASS: TestAccEC2TransitGateway_serial/Connect (2939.83s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTableAssociation (712.92s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (271.41s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/TransitGatewayDefaultRouteTablePropagation (454.51s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/basic (482.83s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/disappears (471.66s)
--- PASS: TestAccEC2TransitGateway_serial/Connect/Tags (546.51s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 7847.465s
@steweg Thanks for the contribution 🎉 👏. |
I'm going to merge this one and let nightly CI take care of running all the Transit Gateway acceptance tests. |
This functionality has been released in v4.4.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! |
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. |
Community Note
PR description
Closes #16844.
Closes #18425.
Supersedes #20780.
Output from acceptance testing:
I have run all the tests that I have created or modified, all have passed. I am also using it already in my project. Unfortunately I was not to run full acceptance testing by myself due to my AWS account limitations. Therefore please run these by you and if something pops up, please let me know and I will fix it
$ make testacc TESTS=TestAccEC2TransitGateway PKG=ec2
$ make testacc TESTS=TestAccEC2TransitGatewayDataSource PKG=ec2
$ make testacc TESTS=TestValidateIPv4OrIPv6 PKG=ec2