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

E ec2 transit gateway update params #15556

Merged
merged 2 commits into from
Nov 12, 2020
Merged

E ec2 transit gateway update params #15556

merged 2 commits into from
Nov 12, 2020

Conversation

philnichol
Copy link
Contributor

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #15380

Release note for CHANGELOG:

ec2_transit_gateway options no longer ForceNew unless required to

Output from acceptance testing:

$ TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSEc2TransitGateway_ -timeout 60m
=== RUN   TestAccAWSEc2TransitGateway_basic
=== PAUSE TestAccAWSEc2TransitGateway_basic
=== RUN   TestAccAWSEc2TransitGateway_disappears
=== PAUSE TestAccAWSEc2TransitGateway_disappears
=== RUN   TestAccAWSEc2TransitGateway_AmazonSideASN
=== PAUSE TestAccAWSEc2TransitGateway_AmazonSideASN
=== RUN   TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments
=== PAUSE TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments
=== RUN   TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled
=== PAUSE TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled
=== RUN   TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation
=== PAUSE TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation
=== RUN   TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation
=== PAUSE TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation
=== RUN   TestAccAWSEc2TransitGateway_DnsSupport
=== PAUSE TestAccAWSEc2TransitGateway_DnsSupport
=== RUN   TestAccAWSEc2TransitGateway_VpnEcmpSupport
=== PAUSE TestAccAWSEc2TransitGateway_VpnEcmpSupport
=== RUN   TestAccAWSEc2TransitGateway_Description
=== PAUSE TestAccAWSEc2TransitGateway_Description
=== RUN   TestAccAWSEc2TransitGateway_Tags
=== PAUSE TestAccAWSEc2TransitGateway_Tags
=== CONT  TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation
=== CONT  TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments
=== CONT  TestAccAWSEc2TransitGateway_Tags
=== CONT  TestAccAWSEc2TransitGateway_Description
--- PASS: TestAccAWSEc2TransitGateway_Description (250.44s)
=== CONT  TestAccAWSEc2TransitGateway_VpnEcmpSupport
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (250.46s)
=== CONT  TestAccAWSEc2TransitGateway_DnsSupport
--- PASS: TestAccAWSEc2TransitGateway_Tags (250.75s)
=== CONT  TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (458.23s)
=== CONT  TestAccAWSEc2TransitGateway_AmazonSideASN
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (244.72s)
=== CONT  TestAccAWSEc2TransitGateway_disappears
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (245.00s)
=== CONT  TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (154.88s)
=== CONT  TestAccAWSEc2TransitGateway_basic
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (443.14s)
=== CONT  TestAccAWSEc2TransitGateway_disappears
    resource_aws_ec2_transit_gateway_test.go:151: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSEc2TransitGateway_disappears (200.45s)
--- PASS: TestAccAWSEc2TransitGateway_basic (204.20s)
--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (453.35s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	913.648s
...

To set either (default_route_table_association|default_route_table_propagation) you must pass in a route table ID.
On creation, if either of (default_route_table_association|default_route_table_propagation) are set to enable, a default route table is created, and the ID of that route table is used.
On modification, a route table is not created, so an ID must be passed in manually.

Hoping for some guidance, so far I left enabling either of those 2 out of this PR (although now disabling them won't ForceNew), but if the consensus is that they should be fully included, I suppose we could create a routeTable as part of the Update function if any of these change to "enable". Note that making this same change via console would require you to first create a TGW route table.

@philnichol philnichol requested a review from a team October 8, 2020 12:41
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 8, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 8, 2020
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 12, 2020
@bflad bflad added this to the v3.15.0 milestone Nov 12, 2020
@bflad bflad self-assigned this Nov 12, 2020
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 great, thank you especially for all the testing additions 🚀

With regards for default_route_table_(association|propagation) changes without the default route table existing, we can punt on that for now here and potentially document or add a followup change set to handle/error for that situation.

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (491.82s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (249.04s)
--- PASS: TestAccAWSEc2TransitGateway_basic (249.90s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (490.64s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (173.44s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (490.24s)
--- PASS: TestAccAWSEc2TransitGateway_Description (249.05s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (254.64s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (248.99s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (247.02s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (248.35s)

@bflad bflad merged commit 937e33b into hashicorp:master Nov 12, 2020
bflad added a commit that referenced this pull request Nov 12, 2020
@philnichol philnichol deleted the e-ec2-transit-gateway-update-params branch November 12, 2020 15:37
@ghost
Copy link

ghost commented Nov 12, 2020

This has been released in version 3.15.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 Dec 12, 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 as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/M 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.

aws_ec2_transit_gateway support update of parameters
2 participants