-
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
New resource: aws_dx_transit_virtual_interface #8522
New resource: aws_dx_transit_virtual_interface #8522
Conversation
0b33c48
to
55247fb
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.
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. |
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.
9001 vs. 8500
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.
Whoops, missed that one; Fixed.
@ewbankkit Do you know what is preventing this from being merged? I'd love to have this resource available |
@heycasey I'll fix the merge conflict. |
c55e29f
to
68c2994
Compare
Rebased to fix merge conflict. |
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.
Hi @ewbankkit 👋 Thanks for contributing this. Please see the below for some minor changes but otherwise good submission. Please reach out if you have any questions or 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).
return err | ||
} | ||
|
||
return resourceAwsDxTransitVirtualInterfaceUpdate(d, meta) |
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.
Since CreateTransitVirtualInterface
can support tag-on-create and already handles MTU appropriately above, we should prefer to call Read
after Create
.
return resourceAwsDxTransitVirtualInterfaceUpdate(d, meta) | |
return resourceAwsDxTransitVirtualInterfaceRead(d, meta) |
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.
Will do.
return nil | ||
} | ||
|
||
func testAccCheckAwsDxTransitVirtualInterfaceExists(name string) resource.TestCheckFunc { |
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.
Our testAccCheck...Exists()
functions should be calling the API to verify the infrastructure exists as expected -- similar but opposite to the testAccCheckAwsDxTransitVirtualInterfaceDestroy
function above. 👍
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.
Will do.
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.
I'll do the same for other DX virtual interface resources in #9572.
Co-Authored-By: Brian Flad <bflad417@gmail.com>
… allowed on a Connection'.
@bflad Review comments addressed.
Latest acceptance tests: $ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxTransitVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxTransitVirtualInterface -timeout 120m
=== RUN TestAccAwsDxTransitVirtualInterface
=== RUN TestAccAwsDxTransitVirtualInterface/basic
=== RUN TestAccAwsDxTransitVirtualInterface/tags
--- PASS: TestAccAwsDxTransitVirtualInterface (1626.76s)
--- PASS: TestAccAwsDxTransitVirtualInterface/basic (975.40s)
--- PASS: TestAccAwsDxTransitVirtualInterface/tags (651.36s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1626.831s |
Awesome, thanks @ewbankkit. Updates look good. 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. 👍 |
One last change - Setting === RUN TestAccAwsDxTransitVirtualInterface/tags
--- PASS: TestAccAwsDxTransitVirtualInterface/tags (514.06s) |
Using common Exists and Destroy methods from #9572 in acceptance tests. $ DX_CONNECTION_ID=dxcon-aaaaaaaa make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxTransitVirtualInterface'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAwsDxTransitVirtualInterface -timeout 120m
=== RUN TestAccAwsDxTransitVirtualInterface
=== RUN TestAccAwsDxTransitVirtualInterface/basic
=== RUN TestAccAwsDxTransitVirtualInterface/tags
--- PASS: TestAccAwsDxTransitVirtualInterface (1584.46s)
--- PASS: TestAccAwsDxTransitVirtualInterface/basic (942.27s)
--- PASS: TestAccAwsDxTransitVirtualInterface/tags (642.19s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1584.521s |
Is there anything I can do to help @bflad ? I saw that you were looking for another person to do acceptance testing, and I'd be happy to do that if I had documentation that describes how to do this. Ready to help to get this PR merged ASAP. |
@bflad I ran the acceptance test with my DX Connection and it seems to work as advertised (actual dxcon redacted)...
|
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.
Code looks good and approving on two passing community acceptance testing runs! 🚀 Thanks so much @ewbankkit and @ryno75!
This has been released in version 2.23.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! |
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! |
Community Note
Part of the work for #8490.
Replaces #8514.
Acceptance tests (requires an existing Direct Connect connection in available state):