full-energy-64138
11/14/2022, 1:37 PMawsx.ec2.Vpc
. Let’s say we have the following VPC:
typescript
const vpc = new awsx.ec2.Vpc("myVpc", {
subnets: [
{
type: "isolated",
name: "cool-subnet"
cidrMask: 24,
},
],
});
What I expected to happen is that the created subnet will be named myVpc-hi-0
, however it’s named myVpc-hi-isolated-0
:(
I think this isn’t the documented behaviour, but maybe I misread it.
What I’m actually trying to do is have the ability to change a subent’s type in production without completely recreating the subnet, which is costly. It would be great if I could have temporary internet access in an isolated environment via Pulumi. Is this possible?billowy-army-68599
11/14/2022, 3:05 PMfull-energy-64138
11/14/2022, 5:20 PM(async () => {
const ngw = await vpc.natGateways;
vpc.isolatedSubnets.then((nets) => nets[0].createRoute("nat", ngw[0]));
})();
I don’t think it justifies an issue, because I don’t have any good use case other than that. Maybe the phrasing in the docs could be changed? The sentence “If not provided, the type of the subnet will be used” made me think that the type will not be used in the namebillowy-army-68599
11/14/2022, 5:24 PMfull-energy-64138
11/14/2022, 5:27 PMbillowy-army-68599
11/14/2022, 5:28 PMfull-energy-64138
11/14/2022, 5:32 PMbillowy-army-68599
11/14/2022, 5:33 PM