feat(aws): add --create-vpc option to provision a dedicated VPC#360
Merged
PierreBeucher merged 3 commits intoApr 12, 2026
Merged
Conversation
Contributor
Author
|
Test coverage note The following test files will need updates to cover the new AWS fields introduced across this batch of PRs (#360, #362):
Since multiple PRs in this batch touch the same files, would you prefer each PR adds its own test updates, or a single follow-up PR updating all tests after these land? Happy to implement whichever approach you prefer. |
Owner
|
This loos like a nice addition well done, AI made a few mistakes that it should be able to fix with my comments. Also make sure to test use case without additional VPC please as stated in checklist ;) |
Add a --create-vpc flag (and matching interactive wizard prompt) that creates a full public networking stack before the EC2 instance: - VPC (10.0.0.0/16, DNS enabled) - Internet Gateway - One public subnet per availability zone (10.0.N.0/24), each with mapPublicIpOnLaunch enabled, so spot instances can be scheduled in whichever AZ has capacity - Route table with a default route to the IGW, associated to every subnet If --zone is specified the instance uses that AZ's subnet; otherwise the first available subnet is used and AWS picks the AZ. The createVpc flag is persisted in instance state and passed through to Pulumi on every subsequent provision so the VPC lifecycle is fully managed alongside the instance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Assign an Amazon-provided IPv6 /56 block to the VPC and carve a /64 per subnet. Add a ::/0 route to the IGW so instances get a routable IPv6 address without any extra configuration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ract CloudyPadVpc component, fix AZ stability
- Rename createVpc (boolean) -> dedicatedVpc ({ enabled: boolean }) for extensibility (future cidr/IPv6 options)
- Extract VPC creation into a CloudyPadVpc ComponentResource to encapsulate networking concerns
- Fix AZ stability: use {region}a instead of subnets[0] so repeated Pulumi runs always target the same AZ, keeping EBS volumes and instances co-located
- CLI flag renamed --create-vpc -> --dedicated-vpc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
201ba31 to
41741bf
Compare
Owner
|
LGTM, thanks ! I'll do a quick test on the branch and then merge it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--create-vpcflag and matching interactive wizard prompt that provisions a full public networking stack alongside the EC2 instancecreateVpcsetting is persisted in instance state and passed through to Pulumi on every subsequent provision, so the VPC lifecycle is fully managed with the instanceResources created
10.0.0.0/16, DNS enabled, Amazon-provided/56IPv6 CIDR)10.0.N.0/24+/64IPv6 CIDR carved from the VPC block,mapPublicIpOnLaunchenabled)0.0.0.0/0) and IPv6 (::/0) routes to the IGW, associated to every subnetIf
--zoneis specified the instance uses that AZ's subnet; otherwise the first available subnet is used.Test plan
cloudypad create aws --create-vpccompletes successfully in an account with no default VPCcloudypad create aws(without--create-vpc) continues to work as beforecloudypad destroy <name>tears down the VPC and all subnets cleanly--create-vpcand no--zonelaunches successfully🤖 Generated with Claude Code