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: aws_dx_hosted_transit_virtual_interface and aws_dx_hosted_transit_virtual_interface_accepter #8523

Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented May 3, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Part of the work for #8490.
Related:

Acceptance tests (requires an existing Direct Connect connection in available state):

$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedTransitVirtualInterface_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedTransitVirtualInterface_basic -timeout 120m
=== RUN   TestAccAwsDxHostedTransitVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedTransitVirtualInterface_basic
=== CONT  TestAccAwsDxHostedTransitVirtualInterface_basic
--- PASS: TestAccAwsDxHostedTransitVirtualInterface_basic (646.75s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	646.830s

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/directconnect Issues and PRs that pertain to the directconnect service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels May 3, 2019
@ewbankkit ewbankkit changed the title [WIP] New resources: aws_dx_hosted_transit_virtual_interface and aws_dx_hosted_transit_virtual_interface_accepter New resources: aws_dx_hosted_transit_virtual_interface and aws_dx_hosted_transit_virtual_interface_accepter May 4, 2019
@ewbankkit ewbankkit force-pushed the issue-8490.dx_hosted_transit_virtual_interface branch from b69e578 to 026110c Compare May 4, 2019 00:31
Copy link
Contributor

@n3ph n3ph left a comment

Choose a reason for hiding this comment

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

MTU of a transit virtual interface is 8500 - Not 9001

* `id` - The ID of the virtual interface.
* `arn` - The ARN of the virtual interface.
* `aws_device` - The Direct Connect endpoint on which the virtual interface terminates.
* `jumbo_frame_capable` - Indicates whether jumbo frames (9001 MTU) are supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

9001 vs. 8500

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, missed that one; Fixed.

@ewbankkit
Copy link
Contributor Author

Rebased to fix merge conflict.
@n3ph Are there any more review comments to address?

@bflad bflad added the new-resource Introduces a new resource. label Jul 29, 2019
@bflad bflad self-assigned this Jul 29, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi again @ewbankkit 👋 Overall this looks good as well. Please reach out with any questions or if you do not have time to implement the feedback.

Since this Direct Connect resource testing requires a physical connection setup that the maintainers do not currently have access to, we can approve this pull request after the changes and two community acceptance test passing runs (one of these can be yours).

website/aws.erb Outdated
@@ -876,6 +876,12 @@
<li>
<a href="/docs/providers/aws/r/dx_public_virtual_interface.html">aws_dx_public_virtual_interface</a>
</li>
<li>
<a href="/docs/providers/aws/r/dx_hosted_transit_virtual_interface.html">aws_dx_hosted_transit_virtual_interface</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: The sidebar should be alphabetically sorted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

* `virtual_interface_id` - (Required) The ID of the Direct Connect virtual interface to accept.
* `tags` - (Optional) A mapping of tags to assign to the resource.

### Removing `aws_dx_hosted_transit_virtual_interface_accepter` from your configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

This section should instead be a note at the top of the resource page, using the ~> **NOTE:** Message here syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

return nil
}

func testAccCheckAwsDxHostedTransitVirtualInterfaceExists(name string) resource.TestCheckFunc {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same note as #8522 here -- the testAccCheck...Exists() should be verifying the infrastructure was properly created via the API -- similar but opposite of testAccCheckAwsDxHostedTransitVirtualInterfaceDestroy above. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Jul 29, 2019
@ewbankkit
Copy link
Contributor Author

@bflad Review comments addressed.
Similar changes for the acceptance tests as for aws_dx_transit_virtual_interface.

Latest acceptance tests:

$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedTransitVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedTransitVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedTransitVirtualInterface
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/basic
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/accepterTags
--- PASS: TestAccAwsDxHostedTransitVirtualInterface (1734.33s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/basic (1078.51s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/accepterTags (655.82s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1734.409s

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 30, 2019
@bflad
Copy link
Contributor

bflad commented Jul 31, 2019

Thanks, @ewbankkit. Updates look great here too. If another person can verify the acceptance testing also passes on their own Direct Connect connection and show the output here, we'll merge this in. 👍

@ewbankkit
Copy link
Contributor Author

One last change - Setting arn can be moved to the Read method now, removing duplicated code.
This can't be done for aws_dx_hosted_transit_virtual_interface_accepter as there's no way to set tags while confirming (accepting) the interface.

@ewbankkit
Copy link
Contributor Author

Using common Exists and Destroy methods from #9572 in acceptance tests.
Acceptance tests:

$ AWS_ALTERNATE_PROFILE=pppppppp DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedTransitVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxHostedTransitVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedTransitVirtualInterface
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/basic
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/accepterTags
--- PASS: TestAccAwsDxHostedTransitVirtualInterface (1360.23s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/basic (696.04s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/accepterTags (664.18s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1360.308s

@jkodroff
Copy link
Contributor

jkodroff commented Aug 6, 2019

@ryno75 You available to test this one?

@ryno75
Copy link
Contributor

ryno75 commented Aug 27, 2019

oh geez... just seeing this now. I'll see if I can accommodate that.

@ewbankkit ewbankkit force-pushed the issue-8490.dx_hosted_transit_virtual_interface branch from 018fbcb to fea2d73 Compare October 4, 2019 21:00
@ewbankkit
Copy link
Contributor Author

Rebased to fix conflicts and did the Terraform Plugin SDK migration for the new resources.

@ryno75 Will you be able to verify?
Thanks.

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Nov 7, 2019

Documentation changes for #10684.
Add subcategory: "Direct Connect" to the new markdown files above layout.
Done.

@devonbleak
Copy link
Contributor

Are we just missing an additional test validation on this? I have a spare DX connection at the moment and can probably run this tomorrow if so.

@ewbankkit
Copy link
Contributor Author

@devonbleak Yes, an additional test validation is all that is required and would be much appreciated; Thanks.

@devonbleak
Copy link
Contributor

Confirming acceptance tests:

$ AWS_ALTERNATE_PROFILE=tf-test DX_CONNECTION_ID=dxcon-redacted make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedTransitVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAwsDxHostedTransitVirtualInterface -timeout 120m
=== RUN   TestAccAwsDxHostedTransitVirtualInterface
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/accepterTags
=== RUN   TestAccAwsDxHostedTransitVirtualInterface/basic
--- PASS: TestAccAwsDxHostedTransitVirtualInterface (1163.86s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/accepterTags (538.47s)
    --- PASS: TestAccAwsDxHostedTransitVirtualInterface/basic (625.38s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       1165.061s

@ewbankkit
Copy link
Contributor Author

ewbankkit commented Nov 22, 2019

@devonbleak Many thanks for the independent verification.
@bflad Any chance of getting this merged now? I will address the refactor to use keyvaluetags via #9572.

@bflad bflad self-requested a review November 22, 2019 15:02
@bflad bflad self-assigned this Nov 22, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

This looks good, thanks @ewbankkit so much for all your work here (including keeping up with our development changes while this was pending) and @devonbleak for the testing assistance! 🚀

Approving per our community testing strategy for Direct Connect resources after code review. 👍

@bflad bflad added this to the v2.40.0 milestone Nov 22, 2019
@bflad
Copy link
Contributor

bflad commented Nov 22, 2019

Aside: @devonbleak if any of the other open service/directconnect PRs interest your team as well, I believe there are a few others simply pending another testing run: https://github.com/terraform-providers/terraform-provider-aws/pulls?q=is%3Aopen+label%3Aservice%2Fdirectconnect+is%3Apr

@bflad bflad merged commit 16643d4 into hashicorp:master Nov 22, 2019
bflad added a commit that referenced this pull request Nov 22, 2019
@ewbankkit ewbankkit deleted the issue-8490.dx_hosted_transit_virtual_interface branch November 22, 2019 16:55
@ghost
Copy link

ghost commented Nov 27, 2019

This has been released in version 2.40.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
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. provider Pertains to the provider itself, rather than any interaction with AWS. service/directconnect Issues and PRs that pertain to the directconnect 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.

6 participants