Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VPC support for Auto subnet layout strategy #1355

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Aug 1, 2024

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 t0yv0 requested a review from corymhall August 1, 2024 23:08
Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically a breaking change right? Or does Legacy and Auto produce the same result from an undefined subnetStrategy?

@t0yv0
Copy link
Member Author

t0yv0 commented Aug 2, 2024

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

Base automatically changed from t0yv0/pick-allocator to master August 2, 2024 15:59
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 t0yv0 force-pushed the t0yv0/fix-vpc-subnet-allocator-selection-for-auto branch from 8970f35 to e719b6d Compare August 2, 2024 18:46
@t0yv0
Copy link
Member Author

t0yv0 commented Aug 2, 2024

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 t0yv0 requested a review from corymhall August 2, 2024 18:53
@t0yv0
Copy link
Member Author

t0yv0 commented Aug 5, 2024

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

@t0yv0 t0yv0 merged commit 6fb976e into master Aug 5, 2024
11 checks passed
@t0yv0 t0yv0 deleted the t0yv0/fix-vpc-subnet-allocator-selection-for-auto branch August 5, 2024 17:53
@mjeffryes mjeffryes added this to the 0.108 milestone Aug 16, 2024
@pulumi-renovate pulumi-renovate bot mentioned this pull request Mar 2, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants