generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1774 from hlazrv/d-improve-awscc_ec2_transit_gate…
…way_route_table_association docs - awscc_ec2_transit_gateway_route_table_association
- Loading branch information
Showing
3 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...c2_transit_gateway_route_table_association/ec2_transit_gateway_route_table_association.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
26 changes: 26 additions & 0 deletions
26
templates/resources/ec2_transit_gateway_route_table_association.md.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |