pulumi-awsx icon indicating copy to clipboard operation
pulumi-awsx copied to clipboard

Fix VPC support for Auto subnet layout strategy

Open t0yv0 opened this issue 1 year ago • 2 comments

The awsx.ec2.Vpc resource supports three subnet layout strategies: Auto, Exact, and Legacy. Consider the following program that does not specify the subnet specs:

new awsx.ec2.Vpc("vpc", {
    subnetStrategy: "Auto",
});

Prior to this change, the code would implicitly use the Legacy strategy for this program even though Auto is requested. This is now fixed. The Auto strategy already supports allocating subnets without any explicit specs provided.

t0yv0 avatar Aug 01 '24 23:08 t0yv0

I can try to see if actual allocation without any subnetSpecs differs between legacy and auto allocator.

t0yv0 avatar Aug 02 '24 13:08 t0yv0

It looks like legacy and auto strategies are generating the same layout. I've confirmed by provisioning this program on the prod version of the provider and testing upgrading the provider with this change. It's a no-change plan:

Resources:
    34 unchanged

t0yv0 avatar Aug 02 '24 18:08 t0yv0

@corymhall can I have a quick review here? This simplifies case analysis in the PR that supports using IPAM with awsx.ec2.Vpc.

t0yv0 avatar Aug 05 '24 17:08 t0yv0