magnificent-smartphone-40853
06/18/2023, 12:26 AMconst vpc = awsx.ec2.Vpc.fromExistingIds(`vpc-${environment}-${regionAlias}`, {
vpcId,
privateSubnetIds,
publicSubnetIds,
});
For some reason the subnets that it returns have the wrong subnet name
I'm seeing
• vpc-dev-use1-private-0
• vpc-dev-use1-private-2
• vpc-dev-use1-private-1
• vpc-dev-use1-private-3
• vpc-dev-use1-public-1
• vpc-dev-use1-public-0
instead of
• vpc-dev-use1-data-private-0
• vpc-dev-use1-data-private-1
• vpc-dev-use1-app-private-0
• vpc-dev-use1-app-private-1
• vpc-dev-use1-edge-private-0
• vpc-dev-use1-edge-private-1
The VPC is created in another stack like so:
return new awsx.ec2.Vpc(vpcName, {
... redacted for brevity ...
// Allocate three subnets per AZ: public (edge), private (app), private (data):
subnets: [
{ type: 'public', name: 'edge', cidrMask: 24 }, // 256 IPs with CIDR mask of /24
{ type: 'private', name: 'app', cidrMask: 24 }, // 256 IPs with CIDR mask of /24
{ type: 'private', name: 'data', cidrMask: 24 }, // 256 IPs with CIDR mask of /24
]
});
What am I doing wrong?echoing-dinner-19531
06/18/2023, 8:05 AM