clean-diamond-27934
08/19/2021, 9:20 PMconst subnet_public = []
for (let it = 1; it <= 2; it++) {
subnet_public.push(new aws.ec2.Subnet(`${name}-public-${it}`, {
vpcId: vpc.id,
cidrBlock: `10.0.${2+it}.0/24`,
availabilityZone: azs.then(azs => azs.names[`${it}`]),
tags: {
'Name': `${name}-public-${it}`,
'<http://kubernetes.io/role/elb|kubernetes.io/role/elb>': '1',
[`<http://kubernetes.io/cluster/pulumi-${environment}`|kubernetes.io/cluster/pulumi-${environment}`>]: 'shared',
[`<http://kubernetes.io/cluster/pulumi-${environment}`|kubernetes.io/cluster/pulumi-${environment}`>]: 'shared',
},
}));
}
....
const publicRouteTableAssociation = new aws.ec2.RouteTableAssociation("publicRouteTableAssociation", {
routeTableId: publicRouteTable.id,
subnetId: pulumi.all(subnet_public[0,1]),
});
what is the proper way you may suggest of specifying - subnetId: pulumi.all(subnet_public[0,1])
Cheerslittle-cartoon-10569
08/19/2021, 10:03 PMpulumi.all
in this case.
const publicRouteTableAssociation = new aws.ec2.RouteTableAssociation("publicRouteTableAssociation", {
routeTableId: publicRouteTable.id,
subnetId: subnet_public[0].id
});
salmon-account-74572
08/19/2021, 11:12 PM