Skip to content

Commit

Permalink
Merge pull request #1774 from hlazrv/d-improve-awscc_ec2_transit_gate…
Browse files Browse the repository at this point in the history
…way_route_table_association

docs - awscc_ec2_transit_gateway_route_table_association
  • Loading branch information
marcosentino authored Jun 10, 2024
2 parents 2c90360 + 68bc3eb commit 7c48c7d
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
47 changes: 45 additions & 2 deletions docs/resources/ec2_transit_gateway_route_table_association.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_ec2_transit_gateway_route_table_association Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,6 +9,50 @@ description: |-

Resource Type definition for AWS::EC2::TransitGatewayRouteTableAssociation

## Example Usage
Associates the specified attachment with the specified transit gateway route table. You can associate one route table with an attachment.
```terraform
#Creates a transit gateway route table association
resource "awscc_ec2_transit_gateway_route_table_association" "example" {
transit_gateway_attachment_id = awscc_ec2_transit_gateway_attachment.example.id
transit_gateway_route_table_id = awscc_ec2_transit_gateway_route_table.example.id
}
#Create a transit gateway attachment
resource "awscc_ec2_transit_gateway_attachment" "example" {
subnet_ids =[ awscc_ec2_subnet.example.id ]
transit_gateway_id = awscc_ec2_transit_gateway.example.id
vpc_id = awscc_ec2_vpc.example.id
}
# Create an VPC
resource "awscc_ec2_vpc" "example" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
}
# Create a public subnet
resource "awscc_ec2_subnet" "example" {
vpc_id = awscc_ec2_vpc.example.id
cidr_block = "10.0.0.0/24"
}
# Create a transit gateway
resource "awscc_ec2_transit_gateway" "example" {
amazon_side_asn = 64512
auto_accept_shared_attachments = "enable"
default_route_table_association = "disable"
default_route_table_propagation = "disable"
dns_support = "enable"
vpn_ecmp_support = "enable"
}
# Create a transit gateway route table
resource "awscc_ec2_transit_gateway_route_table" "example" {
transit_gateway_id = awscc_ec2_transit_gateway.example.id
}
```


<!-- schema generated by tfplugindocs -->
Expand All @@ -30,4 +73,4 @@ Import is supported using the following syntax:

```shell
$ terraform import awscc_ec2_transit_gateway_route_table_association.example <resource ID>
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#Creates a transit gateway route table association
resource "awscc_ec2_transit_gateway_route_table_association" "example" {
transit_gateway_attachment_id = awscc_ec2_transit_gateway_attachment.example.id
transit_gateway_route_table_id = awscc_ec2_transit_gateway_route_table.example.id
}

#Create a transit gateway attachment
resource "awscc_ec2_transit_gateway_attachment" "example" {
subnet_ids =[ awscc_ec2_subnet.example.id ]
transit_gateway_id = awscc_ec2_transit_gateway.example.id
vpc_id = awscc_ec2_vpc.example.id
}

# Create an VPC
resource "awscc_ec2_vpc" "example" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
}

# Create a public subnet
resource "awscc_ec2_subnet" "example" {
vpc_id = awscc_ec2_vpc.example.id
cidr_block = "10.0.0.0/24"
}

# Create a transit gateway
resource "awscc_ec2_transit_gateway" "example" {
amazon_side_asn = 64512
auto_accept_shared_attachments = "enable"
default_route_table_association = "disable"
default_route_table_propagation = "disable"
dns_support = "enable"
vpn_ecmp_support = "enable"
}

# Create a transit gateway route table
resource "awscc_ec2_transit_gateway_route_table" "example" {
transit_gateway_id = awscc_ec2_transit_gateway.example.id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage
Associates the specified attachment with the specified transit gateway route table. You can associate one route table with an attachment.
{{ tffile (printf "examples/resources/%s/ec2_transit_gateway_route_table_association.tf" .Name)}}


{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}

0 comments on commit 7c48c7d

Please sign in to comment.