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

resource/aws_dx_hosted_private_virtual_interface: Update resource to support MTU param #6142

Merged

Conversation

slapula
Copy link
Contributor

@slapula slapula commented Oct 13, 2018

Fixes #6136

Changes proposed in this pull request:

  • Updated aws_dx_hosted_private_virtual_interface resource to support new MTU parameter

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -run=TestAccAwsDxHostedPrivateVirtualInterface_basic -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
--- SKIP: TestAccAwsDxHostedPrivateVirtualInterface_basic (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.022s

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/directconnect Issues and PRs that pertain to the directconnect service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 13, 2018
Computed: true,
ForceNew: true,
},
"jumbo_frame_enabled": {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ewbankkit
Copy link
Contributor

See comment on adding verification to acceptance tests: #6141 (comment).

@ghost ghost added size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Oct 13, 2018
@@ -77,6 +77,16 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource {
ForceNew: true,
ValidateFunc: validateAwsAccountId,
},
"mtu": {
Copy link
Contributor

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,
Copy link
Contributor

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.

@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Oct 23, 2018
@ewbankkit
Copy link
Contributor

@slapula Can I take a look at this one now?

Kit Ewbank added 2 commits October 23, 2018 12:46
@ewbankkit
Copy link
Contributor

@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

@ewbankkit
Copy link
Contributor

If you merge in the changes from my branch I will be able to run the full set of tests from your branch.

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Oct 23, 2018
@slapula
Copy link
Contributor Author

slapula commented Oct 24, 2018

@ewbankkit This one should be ready to move forward now.

@ewbankkit
Copy link
Contributor

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.
#6141 should be merged first as this PR contains commits from that PR.

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.

Thanks @slapula and @ewbankkit! 🚀

@bflad bflad merged commit 42f8202 into hashicorp:master Oct 30, 2018
bflad added a commit that referenced this pull request Oct 30, 2018
@bflad
Copy link
Contributor

bflad commented Nov 1, 2018

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.

@ghost
Copy link

ghost commented Apr 2, 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 Apr 2, 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. 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.

Feature request: Direct Connect support for changing network MTU
3 participants