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

service/ec2: Treat empty TGW Route Table IDs when searching for associations/propagations as missing #6665

Merged
merged 1 commit into from
Dec 3, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 30, 2018

Fixes #6664

When creating an EC2 Transit Gateway with both flags set to disable default route table association and propagation, presumably it is no longer creating a default route table, which would cause issues downstream when determining if the VPC attachment was associated with said (now non-existent) default route table. This logic now returns that the association/propagation doesn't exist if there is not a provided route table ID to check.

Previously:

--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (87.32s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ec2_transit_gateway_vpc_attachment.test: 1 error occurred:
        	* aws_ec2_transit_gateway_vpc_attachment.test: error updating EC2 Transit Gateway Attachment (tgw-attach-0e5e1795143bd2b2e) Route Table () association: error determining EC2 Transit Gateway Attachment Route Table () association (tgw-attach-0e5e1795143bd2b2e): MissingParameter: Missing required parameter in request: TransitGatewayRouteTableId.

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (282.51s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (282.79s)
--- PASS: TestAccAWSEc2TransitGateway_basic (119.74s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (304.57s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (97.26s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (292.85s)
--- PASS: TestAccAWSEc2TransitGateway_Description (303.75s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (133.04s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (294.91s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (142.00s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (262.29s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_Filter (149.81s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_ID (150.09s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (199.22s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (274.00s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_basic (180.87s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears (222.99s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears_TransitGateway (151.50s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_Tags (207.50s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableAssociation_basic (274.40s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_Filter (194.26s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_ID (182.70s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTablePropagation_basic (237.60s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (205.70s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (210.35s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (241.30s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (267.59s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (370.24s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (294.68s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (330.97s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (212.14s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (275.11s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (206.94s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (207.48s)

…iations/propagations as missing

Previously:

```
--- FAIL: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (87.32s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ec2_transit_gateway_vpc_attachment.test: 1 error occurred:
        	* aws_ec2_transit_gateway_vpc_attachment.test: error updating EC2 Transit Gateway Attachment (tgw-attach-0e5e1795143bd2b2e) Route Table () association: error determining EC2 Transit Gateway Attachment Route Table () association (tgw-attach-0e5e1795143bd2b2e): MissingParameter: Missing required parameter in request: TransitGatewayRouteTableId.
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (282.51s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (282.79s)
--- PASS: TestAccAWSEc2TransitGateway_basic (119.74s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (304.57s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociationAndPropagationDisabled (97.26s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (292.85s)
--- PASS: TestAccAWSEc2TransitGateway_Description (303.75s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (133.04s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (294.91s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (142.00s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (262.29s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_Filter (149.81s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_ID (150.09s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (199.22s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (274.00s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_basic (180.87s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears (222.99s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears_TransitGateway (151.50s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_Tags (207.50s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableAssociation_basic (274.40s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_Filter (194.26s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_ID (182.70s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTablePropagation_basic (237.60s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (205.70s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (210.35s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (241.30s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (267.59s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (370.24s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (294.68s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (330.97s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociationAndPropagationDisabled (212.14s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (275.11s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (206.94s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (207.48s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 30, 2018
@bflad bflad added this to the v1.51.0 milestone Nov 30, 2018
@bflad bflad requested a review from a team November 30, 2018 18:06
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 30, 2018
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bflad bflad merged commit 2a46f1a into master Dec 3, 2018
@bflad bflad deleted the b-aws_ec2_transit_gateway_vpc_attachment-no-rtb branch December 3, 2018 18:33
bflad added a commit that referenced this pull request Dec 3, 2018
@bflad
Copy link
Contributor Author

bflad commented Dec 5, 2018

This has been released in version 1.51.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@piersf
Copy link

piersf commented Jan 18, 2019

This still remains an issue. Have tried with AWS Provider versions 1.51.0, 1.54.0 and 1.56.0 and the issue appears with all of them. See #6664

@ghost
Copy link

ghost commented Apr 1, 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 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. 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.

EC2 Transit Gateway attachment associations cannot be non-default
3 participants