Trying this directly after the awsx.ec2.vpc creation:
for (var subnet of vpc.getSubnets("private")) {
new aws.ec2.Subnet(subnet.subnetName, {
vpcId: vpc.id,
cidrBlock: subnet.subnet.cidrBlock
}, { import: subnet.id })
}
There's at least a typing issue between the subnet.id and import, which
I cannot seem to fix even though I know both of the types (ts noob).
Casting to any however results in subnet replacement.
Am I doing this right?