-
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
resource/aws_dx_hosted_private_virtual_interface: Update resource to support MTU param #6142
resource/aws_dx_hosted_private_virtual_interface: Update resource to support MTU param #6142
Conversation
Computed: true, | ||
ForceNew: true, | ||
}, | ||
"jumbo_frame_enabled": { |
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.
See comment on attribute naming: https://github.com/terraform-providers/terraform-provider-aws/pull/6141/files#r224957129.
See comment on adding verification to acceptance tests: #6141 (comment). |
@@ -77,6 +77,16 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { | |||
ForceNew: true, | |||
ValidateFunc: validateAwsAccountId, | |||
}, | |||
"mtu": { |
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.
Add a ValidateFunc
to ensure that the value is 1500
or 9001
.
Type: schema.TypeInt, | ||
Default: 1500, | ||
Optional: true, | ||
ForceNew: true, |
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.
It looks like the MTU value for a VIF can be update via the UpdateVirtualInterface
API method, so ForceNew
should not be set.
This will entail adding an Update
method to the resources.
@slapula Can I take a look at this one now? |
…u' into slapula-dx-hosted-private-virtual-interfarce-mtu
@slapula I ran your new acceptance test on the code. I had to fix a couple of minor things - merge error and incorrect resource type in the test - and pushed them to https://github.com/ewbankkit/terraform-provider-aws/tree/slapula-dx-hosted-private-virtual-interfarce-mtu. $ DX_HOSTED_VIF_OWNER_ACCOUNT=000000000000 DX_CONNECTION_ID=dxcon-xxxxxxxx AWS_DEFAULT_REGION=us-east-1 make testacc TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate -timeout 120m
? github.com/terraform-providers/terraform-provider-aws [no test files]
=== RUN TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate (85.31s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 102.660s |
If you merge in the changes from my branch I will be able to run the full set of tests from your branch. |
@ewbankkit This one should be ready to move forward now. |
Acceptance tests: $ git rev-parse HEAD
0089b9fae2b65015aa93e3b1d0f2e7f6b7a648dc
$ DX_HOSTED_VIF_OWNER_ACCOUNT=000000000000 DX_CONNECTION_ID=dxcon-xxxxxxxx AWS_DEFAULT_REGION=us-east-1 make testacc TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface_basic -timeout 120m
? github.com/terraform-providers/terraform-provider-aws [no test files]
=== RUN TestAccAwsDxHostedPrivateVirtualInterface_basic
=== PAUSE TestAccAwsDxHostedPrivateVirtualInterface_basic
=== CONT TestAccAwsDxHostedPrivateVirtualInterface_basic
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (34.74s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 35.576s
$ DX_HOSTED_VIF_OWNER_ACCOUNT=000000000000 DX_CONNECTION_ID=dxcon-xxxxxxxx AWS_DEFAULT_REGION=us-east-1 make testacc TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate -timeout 120m
? github.com/terraform-providers/terraform-provider-aws [no test files]
=== RUN TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_mtuUpdate (96.87s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 97.793s This PR is now ready for review. |
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.
Thanks @slapula and @ewbankkit! 🚀
This has been released in version 1.42.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Fixes #6136
Changes proposed in this pull request:
aws_dx_hosted_private_virtual_interface
resource to support new MTU parameterOutput from acceptance testing: