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

EC2 Transit Gateway Support #6605

Merged
merged 9 commits into from
Nov 27, 2018
Merged

EC2 Transit Gateway Support #6605

merged 9 commits into from
Nov 27, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Nov 27, 2018

FEATURES

  • New Data Source: aws_ec2_transit_gateway
  • New Data Source: aws_ec2_transit_gateway_route_table
  • New Data Source: aws_ec2_transit_gateway_vpc_attachment
  • New Resource: aws_ec2_transit_gateway
  • New Resource: aws_ec2_transit_gateway_route
  • New Resource: aws_ec2_transit_gateway_route_table
  • New Resource: aws_ec2_transit_gateway_route_table_association
  • New Resource: aws_ec2_transit_gateway_route_table_propagation
  • New Resource: aws_ec2_transit_gateway_vpc_attachment

ENHANCEMENTS

  • data-source/aws_route: Add transit_gateway_id attribute
  • data-source/aws_route_table: Add route attribute block transit_gateway_id attribute
  • resource/aws_default_route_table: Add route configuration block transit_gateway_id argument
  • resource/aws_route: Add transit_gateway_id argument
  • resource/aws_route_table: Add route configuration block transit_gateway_id argument
  • resource/aws_vpn_connection: Add transit_gateway_id argument, mark vpn_gateway_id as optional

Output from acceptance testing:

--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (268.14s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (240.87s)
--- PASS: TestAccAWSEc2TransitGateway_basic (95.08s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (238.65s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (185.30s)
--- PASS: TestAccAWSEc2TransitGateway_Description (237.43s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (91.77s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (266.03s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (123.24s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (237.64s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_Filter (150.16s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_ID (119.65s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (243.61s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (271.90s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_basic (188.18s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears (184.64s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears_TransitGateway (129.47s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_Tags (204.81s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableAssociation_basic (327.58s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_Filter (160.76s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_ID (179.25s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTablePropagation_basic (240.96s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (239.16s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (215.37s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (325.79s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (259.76s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (383.95s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (271.63s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (360.71s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (275.88s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (231.16s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (267.39s)

--- PASS: TestAccAWSRoute_basic (43.30s)
--- PASS: TestAccAWSRoute_changeCidr (61.49s)
--- PASS: TestAccAWSRoute_changeRouteTable (66.18s)
--- PASS: TestAccAWSRoute_doesNotCrashWithVPCEndpoint (46.97s)
--- PASS: TestAccAWSRoute_ipv6Support (30.41s)
--- PASS: TestAccAWSRoute_ipv6ToInstance (109.21s)
--- PASS: TestAccAWSRoute_ipv6ToInternetGateway (43.31s)
--- PASS: TestAccAWSRoute_ipv6ToNetworkInterface (124.22s)
--- PASS: TestAccAWSRoute_ipv6ToPeeringConnection (35.43s)
--- PASS: TestAccAWSRoute_noopdiff (117.22s)
--- PASS: TestAccAWSRoute_TransitGatewayID_DestinationCidrBlock (266.11s)

--- PASS: TestAccAWSRouteDataSource_basic (84.87s)
--- PASS: TestAccAWSRouteDataSource_TransitGatewayID (211.50s)

--- PASS: TestAccAWSRouteTable_basic (56.26s)
--- PASS: TestAccAWSRouteTable_complex (204.74s)
--- PASS: TestAccAWSRouteTable_importBasic (38.38s)
--- PASS: TestAccAWSRouteTable_instance (130.87s)
--- PASS: TestAccAWSRouteTable_ipv6 (31.48s)
--- PASS: TestAccAWSRouteTable_panicEmptyRoute (16.07s)
--- PASS: TestAccAWSRouteTable_Route_TransitGatewayID (243.33s)
--- PASS: TestAccAWSRouteTable_tags (45.31s)
--- PASS: TestAccAWSRouteTable_vgwRoutePropagation (47.76s)
--- PASS: TestAccAWSRouteTable_vpcPeering (36.40s)

--- PASS: TestAccAWSDefaultRouteTable_basic (35.17s)
--- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (233.29s)
--- PASS: TestAccAWSDefaultRouteTable_swap (52.40s)
--- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (37.84s)

--- PASS: TestAccAWSVpnConnection_basic (437.85s)
--- PASS: TestAccAWSVpnConnection_disappears (211.26s)
--- PASS: TestAccAWSVpnConnection_importBasic (224.10s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (329.90s)
--- PASS: TestAccAWSVpnConnection_tunnelOptions (264.43s)
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (367.07s)

Changes:

* New Data Source: `aws_ec2_transit_gateway`
* New Data Source: `aws_ec2_transit_gateway_route_table`
* New Data Source: `aws_ec2_transit_gateway_vpc_attachment`
* New Resource: `aws_ec2_transit_gateway`
* New Resource: `aws_ec2_transit_gateway_route`
* New Resource: `aws_ec2_transit_gateway_route_table`
* New Resource: `aws_ec2_transit_gateway_route_table_association`
* New Resource: `aws_ec2_transit_gateway_route_table_propagation`
* New Resource: `aws_ec2_transit_gateway_vpc_attachment`

Output from acceptance testing:

```
--- PASS: TestAccAWSEc2TransitGateway_AmazonSideASN (268.14s)
--- PASS: TestAccAWSEc2TransitGateway_AutoAcceptSharedAttachments (240.87s)
--- PASS: TestAccAWSEc2TransitGateway_basic (95.08s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTableAssociation (238.65s)
--- PASS: TestAccAWSEc2TransitGateway_DefaultRouteTablePropagation (185.30s)
--- PASS: TestAccAWSEc2TransitGateway_Description (237.43s)
--- PASS: TestAccAWSEc2TransitGateway_disappears (91.77s)
--- PASS: TestAccAWSEc2TransitGateway_DnsSupport (266.03s)
--- PASS: TestAccAWSEc2TransitGateway_Tags (123.24s)
--- PASS: TestAccAWSEc2TransitGateway_VpnEcmpSupport (237.64s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_Filter (150.16s)
--- PASS: TestAccAWSEc2TransitGatewayDataSource_ID (119.65s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_basic (243.61s)
--- PASS: TestAccAWSEc2TransitGatewayRoute_disappears (271.90s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_basic (188.18s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears (184.64s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_disappears_TransitGateway (129.47s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTable_Tags (204.81s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableAssociation_basic (327.58s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_Filter (160.76s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTableDataSource_ID (179.25s)
--- PASS: TestAccAWSEc2TransitGatewayRouteTablePropagation_basic (240.96s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_basic (239.16s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_disappears (215.37s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_DnsSupport (325.79s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Ipv6Support (259.76s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_SubnetIds (383.95s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_Tags (271.63s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTableAssociation (360.71s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachment_TransitGatewayDefaultRouteTablePropagation (275.88s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_Filter (231.16s)
--- PASS: TestAccAWSEc2TransitGatewayVpcAttachmentDataSource_ID (267.39s)
```
Changes:

* resource/aws_route: Add `transit_gateway_id` argument

Output from acceptance testing:

```
--- PASS: TestAccAWSRoute_basic (43.30s)
--- PASS: TestAccAWSRoute_changeCidr (61.49s)
--- PASS: TestAccAWSRoute_changeRouteTable (66.18s)
--- PASS: TestAccAWSRoute_doesNotCrashWithVPCEndpoint (46.97s)
--- PASS: TestAccAWSRoute_ipv6Support (30.41s)
--- PASS: TestAccAWSRoute_ipv6ToInstance (109.21s)
--- PASS: TestAccAWSRoute_ipv6ToInternetGateway (43.31s)
--- PASS: TestAccAWSRoute_ipv6ToNetworkInterface (124.22s)
--- PASS: TestAccAWSRoute_ipv6ToPeeringConnection (35.43s)
--- PASS: TestAccAWSRoute_noopdiff (117.22s)
--- PASS: TestAccAWSRoute_TransitGatewayID_DestinationCidrBlock (266.11s)
```
Changes:

* data-source/aws_route: Add `transit_gateway_id` attribute

Output from acceptance testing:

```
--- PASS: TestAccAWSRouteDataSource_basic (84.87s)
--- PASS: TestAccAWSRouteDataSource_TransitGatewayID (211.50s)
```
Changes:

* resource/aws_route_table: Add `route` configuration block `transit_gateway_id` argument

Output from acceptance testing:

```
--- PASS: TestAccAWSRouteTable_basic (56.26s)
--- PASS: TestAccAWSRouteTable_complex (204.74s)
--- PASS: TestAccAWSRouteTable_importBasic (38.38s)
--- PASS: TestAccAWSRouteTable_instance (130.87s)
--- PASS: TestAccAWSRouteTable_ipv6 (31.48s)
--- PASS: TestAccAWSRouteTable_panicEmptyRoute (16.07s)
--- PASS: TestAccAWSRouteTable_Route_TransitGatewayID (243.33s)
--- PASS: TestAccAWSRouteTable_tags (45.31s)
--- PASS: TestAccAWSRouteTable_vgwRoutePropagation (47.76s)
--- PASS: TestAccAWSRouteTable_vpcPeering (36.40s)
```
Changes

* resource/aws_default_route_table: Add `route` configuration block `transit_gateway_id` argument

Output from acceptance testing:

```
--- PASS: TestAccAWSDefaultRouteTable_basic (35.17s)
--- PASS: TestAccAWSDefaultRouteTable_Route_TransitGatewayID (233.29s)
--- PASS: TestAccAWSDefaultRouteTable_swap (52.40s)
--- PASS: TestAccAWSDefaultRouteTable_vpc_endpoint (37.84s)
```
…n_gateway_id as optional

Changes:

* resource/aws_vpn_connection: Add `transit_gateway_id` argument, mark `vpn_gateway_id` as optional

Output from acceptance testing:

```
--- PASS: TestAccAWSVpnConnection_basic (437.85s)
--- PASS: TestAccAWSVpnConnection_disappears (211.26s)
--- PASS: TestAccAWSVpnConnection_importBasic (224.10s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (329.90s)
--- PASS: TestAccAWSVpnConnection_tunnelOptions (264.43s)
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (367.07s)
```
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels Nov 27, 2018
@bflad bflad added this to the v1.49.0 milestone Nov 27, 2018
@bflad bflad requested a review from a team November 27, 2018 10:30
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 27, 2018
@lorengordon
Copy link
Contributor

Not sure if it helps to compare implementations, but CloudFormation also announced support yesterday for this feature, https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html...

---
layout: "aws"
page_title: "AWS: aws_ec2_transit_gateway"
sidebar_current: "docs-aws-resource-ec2-transit-gateway-x"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the -x for? I see it elsewhere and I'm not familiar with the pattern (which doesn't mean anything; I've barely touched the website).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The website highlights in the sidebar based on sidebar_current as a prefix. Since we have multiple pages with docs-aws-resource-ec2-transit-gateway as a prefix, they would all highlight without this differentiation. (The usage of -x specifically is just a pattern we follow in other places).

Copy link
Contributor

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

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

This all looks reasonable to me!

@bflad bflad merged commit badb9a2 into master Nov 27, 2018
@bflad bflad deleted the f-aws_ec2_transit_gateway branch November 27, 2018 23:36
bflad added a commit that referenced this pull request Nov 27, 2018
@Zordrak
Copy link

Zordrak commented Nov 30, 2018

Per #6664, neither of the following resources can be used:

  • aws_ec2_transit_gateway_route_table_association
  • aws_ec2_transit_gateway_route_table_propagation

This is because the aws_ec2_transit_gateway_vpc_attachment they would apply to cannot be created without using the default association and propagation, which these resources then cannot replace.

@piersf
Copy link

piersf commented Jan 18, 2019

This still remains an issue. Tested with both AWS Provider version 1.54.0 and 1.56.0.

@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
enhancement Requests to existing resources that expand the functionality or scope. provider Pertains to the provider itself, rather than any interaction with AWS. service/ec2 Issues and PRs that pertain to the ec2 service. size/XXL 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.

5 participants