diff --git a/data/data/aws/vpc/vpc.tf b/data/data/aws/vpc/vpc.tf index a2534912f2a..a7d6ab083a2 100644 --- a/data/data/aws/vpc/vpc.tf +++ b/data/data/aws/vpc/vpc.tf @@ -18,6 +18,17 @@ resource "aws_vpc" "new_vpc" { ) } +resource "aws_vpc_endpoint" "elasticloadbalancing" { + count = var.vpc == null ? 1 : 0 + + vpc_id = data.aws_vpc.cluster_vpc.id + service_name = "com.amazonaws.${var.region}.elasticloadbalancing" + route_table_ids = concat( + aws_route_table.private_routes.*.id, + aws_route_table.default.*.id, + ) +} + resource "aws_vpc_endpoint" "s3" { count = var.vpc == null ? 1 : 0 diff --git a/docs/user/aws/images/install_upi.dia b/docs/user/aws/images/install_upi.dia index 1119d6e9e4b..7d4af828fa0 100644 Binary files a/docs/user/aws/images/install_upi.dia and b/docs/user/aws/images/install_upi.dia differ diff --git a/docs/user/aws/images/install_upi.svg b/docs/user/aws/images/install_upi.svg index 2d8e14b13e3..e487bd7408c 100644 --- a/docs/user/aws/images/install_upi.svg +++ b/docs/user/aws/images/install_upi.svg @@ -22,9 +22,9 @@ - - S3 VPC - Endpoint + + S3 VPC + Endpoint Route Table @@ -45,6 +45,10 @@ 10.0.0.0/16 + + ELB VPC + Endpoint + Private Hosted @@ -327,4 +331,12 @@ + + Elastic Load Balancing + + + + + + \ No newline at end of file diff --git a/docs/user/aws/images/install_upi_vpc.svg b/docs/user/aws/images/install_upi_vpc.svg index 2bf5caedc72..05d2cdcf40b 100644 --- a/docs/user/aws/images/install_upi_vpc.svg +++ b/docs/user/aws/images/install_upi_vpc.svg @@ -15,9 +15,9 @@ - - S3 VPC - Endpoint + + S3 VPC + Endpoint Route Table @@ -38,6 +38,10 @@ 10.0.0.0/16 + + ELB VPC + Endpoint + Private Hosted diff --git a/upi/aws/cloudformation/01_vpc.yaml b/upi/aws/cloudformation/01_vpc.yaml index de55a49b2fc..55c5a9e8d1c 100644 --- a/upi/aws/cloudformation/01_vpc.yaml +++ b/upi/aws/cloudformation/01_vpc.yaml @@ -244,6 +244,29 @@ Resources: DestinationCidrBlock: 0.0.0.0/0 NatGatewayId: Ref: NAT3 + LoadBalancingEndpoint: + Type: AWS::EC2::VPCEndpoint + Properties: + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: '*' + Action: + - '*' + Resource: + - '*' + RouteTableIds: + - !Ref PublicRouteTable + - !Ref PrivateRouteTable + - !If [DoAz2, !Ref PrivateRouteTable2, !Ref "AWS::NoValue"] + - !If [DoAz3, !Ref PrivateRouteTable3, !Ref "AWS::NoValue"] + ServiceName: !Join + - '' + - - com.amazonaws. + - !Ref 'AWS::Region' + - .elasticloadbalancing + VpcId: !Ref VPC S3Endpoint: Type: AWS::EC2::VPCEndpoint Properties: