hub
This component is responsible for provisioning an AWS Transit Gateway hub
that acts as a centralized gateway for connecting VPCs from other spoke
accounts.
Usage
Stack Level: Regional
Basic Usage with tgw/spoke
Here's an example snippet for how to configure and use this component:
components:
terraform:
tgw/hub/defaults:
metadata:
type: abstract
component: tgw/hub
vars:
enabled: true
name: tgw-hub
expose_eks_sg: false
tags:
Team: sre
Service: tgw-hub
tgw/hub:
metadata:
inherits:
- tgw/hub/defaults
component: tgw/hub
vars:
connections:
- account:
tenant: core
stage: network
vpc_component_names:
- vpc-dev
- account:
tenant: core
stage: artifacts
- account:
tenant: core
stage: auto
eks_component_names:
- eks/cluster
- account:
tenant: plat
stage: dev
vpc_component_names:
- vpc
- vpc/data/1
eks_component_names:
- eks/cluster
- account:
tenant: plat
stage: staging
vpc_component_names:
- vpc
- vpc/data/1
eks_component_names:
- eks/cluster
- account:
tenant: plat
stage: prod
vpc_component_names:
- vpc
- vpc/data/1
eks_component_names:
- eks/cluster
To provision the Transit Gateway and all related resources, run the following commands:
atmos terraform plan tgw/hub -s <tenant>-<environment>-network
atmos terraform apply tgw/hub -s <tenant>-<environment>-network