This message was deleted.
# aws
s
This message was deleted.
c
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?
This faired a little better: for (var subnet of vpc.getSubnets("private")) { subnet.id.apply(id => new aws.ec2.Subnet(subnet.subnetName, { vpcId: vpc.id, cidrBlock: subnet.subnet.cidrBlock }, { import: id })) } But preview gives me the error: 'Duplicate resource URN'.. which doesn't seem right on an import. I also get the warning: "inputs to import do not match the existing resource; importing this resource will fail"
in the hops that the warning would go away, i've added the rest of subnetargs... but it's still warning that 'tags' will be changed, so must not be specifying those correctly. I'm trying to bring them over from the other subnet just like 'cidrBlock' in the last code sample.
this typescript noob couldn't figure out how to get the tags over from the existing subnet cleanly, but specified them by hand and that made everything match up.