awslabs / landing-zone-accelerator-on-aws

Deploy a multi-account cloud foundation to support highly-regulated workloads and complex compliance requirements.
https://aws.amazon.com/solutions/implementations/landing-zone-accelerator-on-aws/
Apache License 2.0
501 stars 390 forks source link

Management of (external) Transit Gateway Attachments #487

Open richardkeit opened 2 weeks ago

richardkeit commented 2 weeks ago

**Problem statement (with example) Integrating Enterprise AWS Cloud Platform to Mulesoft Private Spaces using Transit Gateway Attachments

image

Overall process:

  1. Customer creates Transit Gateway Route table within the Landing Zone Accelerator
  2. Customer Shares Transit Gateway with Mulesoft
  3. Mulesoft create TGW attachment
  4. Customer accepts TGW attachment
  5. Customer configures routing (snippet: Interim auxiliary template for route propagation and route table association)

A east/west firewall is used in this architecture for traffic inspection

Describe the feature you'd like

Additional context Transit Gateway Config:

transitGateways:
  - name: tgw-networking-prod
    account: Network
    region: *HOME_REGION
    shareTargets:
      accounts:
        - NetworkEdge
    routeTables:
      # Routes to spoke VPCs are propogated to the route table
      - name: tgw-rt-infra-firewall-apse2
        routes: []
      - name: tgw-rt-external-np-mulesoft-apse2
        routes:
          - destinationCidrBlock: 0.0.0.0/0
            attachment:
              vpcName: vpc-d-infra-prod-firewall-apse2
              account: NetworkEdge

Interim auxiliary template for route propagation and route table association:

AWSTemplateFormatVersion: "2010-09-09"

Description: Integrate Mulesoft to Existing TGW via Firewall (from Network Core)

Parameters:
  MulesoftAttachmentId:
    Type: String
    Description: Mulesoft Attachment Id

  MulesoftRouteTableId:
    Type: AWS::SSM::Parameter::Value<String>
    Description: SSM path to specific MuleSoft Route Table Id
    Default: /accelerator/network/transitGateways/tgw-networking-prod/routeTables/tgw-rt-external-np-mulesoft-apse2/id

  FirewallRouteTableId:
    Type: AWS::SSM::Parameter::Value<String>
    Description: SSM path to specific Firewall Route Table Id
    Default: /accelerator/network/transitGateways/tgw-networking-prod/routeTables/tgw-rt-infra-firewall-apse2/id

Resources:
  MulesoftRouteTableAssociation:
    Type: AWS::EC2::TransitGatewayRouteTableAssociation
    Properties:
      TransitGatewayAttachmentId: !Ref MulesoftAttachmentId
      TransitGatewayRouteTableId: !Ref MulesoftRouteTableId

  # Firewall
  PropogateMulesoftToFirewall:
    Type: AWS::EC2::TransitGatewayRouteTablePropagation
    Properties:
      TransitGatewayAttachmentId: !Ref MulesoftAttachmentId
      TransitGatewayRouteTableId: !Ref FirewallRouteTableId
bo1984 commented 1 week ago

Hi Richard!

I've went ahead and created a feature request for this. I'll keep this issue open as we continue to evaluate the request in our backlog. If you have any other questions or concerns in the meantime, please do not hesitate to contact us.