diff --git a/docs/resources/ec2_transit_gateway_route_table_propagation.md b/docs/resources/ec2_transit_gateway_route_table_propagation.md index 5d4fe13092..6ad46e71ea 100644 --- a/docs/resources/ec2_transit_gateway_route_table_propagation.md +++ b/docs/resources/ec2_transit_gateway_route_table_propagation.md @@ -1,5 +1,4 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_ec2_transit_gateway_route_table_propagation Resource - terraform-provider-awscc" subcategory: "" description: |- @@ -10,6 +9,50 @@ description: |- AWS::EC2::TransitGatewayRouteTablePropagation Type +## Example Usage +Enables the specified attachment to propagate routes to the specified propagation route table. +```terraform +resource "awscc_ec2_transit_gateway_route_table_propagation" "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 +} +``` + @@ -30,4 +73,4 @@ Import is supported using the following syntax: ```shell $ terraform import awscc_ec2_transit_gateway_route_table_propagation.example -``` +``` \ No newline at end of file diff --git a/examples/resources/awscc_ec2_transit_gateway_route_table_propagation/ec2_transit_gateway_route_table_propagation.tf b/examples/resources/awscc_ec2_transit_gateway_route_table_propagation/ec2_transit_gateway_route_table_propagation.tf new file mode 100644 index 0000000000..a01a477feb --- /dev/null +++ b/examples/resources/awscc_ec2_transit_gateway_route_table_propagation/ec2_transit_gateway_route_table_propagation.tf @@ -0,0 +1,40 @@ +resource "awscc_ec2_transit_gateway_route_table_propagation" "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 +} + diff --git a/templates/resources/ec2_transit_gateway_route_table_propagation.md.tmpl b/templates/resources/ec2_transit_gateway_route_table_propagation.md.tmpl new file mode 100644 index 0000000000..1efe8497b0 --- /dev/null +++ b/templates/resources/ec2_transit_gateway_route_table_propagation.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage +Enables the specified attachment to propagate routes to the specified propagation route table. +{{ tffile (printf "examples/resources/%s/ec2_transit_gateway_route_table_propagation.tf" .Name)}} + + + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }} \ No newline at end of file