generated from cloudposse-terraform-components/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.yaml
118 lines (95 loc) · 4.55 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: "aws-tgw-attachment"
# Canonical GitHub repo
github_repo: "cloudposse-terraform-components/aws-tgw-attachment"
# Short description of this project
description: |-
This component creates a Transit Gateway VPC Attachment and optionally creates an association with a Transit Gateway Route Table.
usage: |-
**Stack Level**: Regional
Here's an example snippet for how to use this component.
```yaml
components:
terraform:
tgw/attachment:
vars:
enabled: true
transit_gateway_id: !terraform.output tgw/hub core-use1-network transit_gateway_id
transit_gateway_route_table_id: !terraform.output tgw/hub core-use1-network transit_gateway_route_table_id
create_transit_gateway_route_table_association: false
```
#### Transit Gateway Route Table Association
In the primary account, the account that has the Transit Gateway and the Transit Gateway Route Table, we need to create an association with the Transit Gateway Route Table. This is necessary for attachments to connect to the Transit Gateway Route Table. For example, if you have a Transit Gateway Route Table in the _core-network_ account, you will need to create an association for each VPCs connected to that Transit Gateway Route Table.
The intention is to have all configuration for a given account in the same stack as that account. For example, since the Transit Gateway Route Table is in the _core-network_ account, we would create all necessary associations in the _core-network_ account.
```yaml
# core-network stack
components:
terraform:
tgw/attachment:
vars:
enabled: true
transit_gateway_id: !terraform.output tgw/hub core-usw2-network transit_gateway_id
transit_gateway_route_table_id: !terraform.output tgw/hub core-usw2-network transit_gateway_route_table_id
# Add an association for this account itself
create_transit_gateway_route_table_association: true
# Include association for each of the connected accounts, if necessary
additional_associations:
- attachment_id: !terraform.output tgw/attachment plat-usw2-dev transit_gateway_attachment_id
route_table_id: !terraform.output tgw/hub transit_gateway_route_table_id
- attachment_id: !terraform.output tgw/attachment plat-usw2-prod transit_gateway_attachment_id
route_table_id: !terraform.output tgw/hub transit_gateway_route_table_id
```
In connected accounts, an account that does _not_ have a Transit Gateway and Transit Gateway Route Table, you do not need to create any associations.
```yaml
# plat-dev stack
components:
terraform:
tgw/attachment:
vars:
enabled: true
transit_gateway_id: !terraform.output tgw/hub core-usw2-network transit_gateway_id
transit_gateway_route_table_id: !terraform.output tgw/hub core-usw2-network transit_gateway_route_table_id
# Do not create an association in this account since there is no Transit Gateway Route Table in this account.
create_transit_gateway_route_table_association: false
```
Plus the same for all other connected accounts.
include:
- "docs/terraform.md"
tags:
- terraform
- terraform-modules
- aws
- components
- terraform-components
- root
- geodesic
- reference-implementation
- reference-architecture
# Categories of this project
categories:
- terraform-modules/root
- terraform-components
# License of this project
license: "APACHE2"
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse-terraform-components/template.svg?style=for-the-badge"
url: "https://github.com/cloudposse-terraform-components/template/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/for-the-badge.svg"
url: "https://slack.cloudposse.com"
references:
- name: "Cloud Posse Documentation"
description: "Complete documentation for the Cloud Posse solution"
url: "https://docs.cloudposse.com"
- name: "Reference Architectures"
description: "Launch effortlessly with our turnkey reference architectures, built either by your team or ours."
url: "https://cloudposse.com/"
related:
- name: "Cloud Posse Terraform Modules"
description: Our collection of reusable Terraform modules used by our reference architectures.
url: "https://docs.cloudposse.com/modules/"
- name: "Atmos"
description: "Atmos is like docker-compose but for your infrastructure"
url: "https://atmos.tools"
contributors: [] # If included generates contribs