-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ec2): explicit mapPublicIpOnLaunch configuration for public subnets #17346
feat(ec2): explicit mapPublicIpOnLaunch configuration for public subnets #17346
Conversation
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; can you please add a test for the behaviors? Both happy case and the error condition.
Pull request has been modified.
@njlynch Added some tests. What do you think? |
@njlynch This is ready for review/merge. Thanks |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…ets (aws#17346) **Issue (Fixes aws#14194, aws#16838 When creating a VPC you can define a SubnetConfiguration but it is not possible to define `mapPublicIpOnLaunch` for public subnets. VPC Example: ``` const vpc = new ec2.Vpc(this, 'vpc-id', { maxAzs: 2, subnetConfiguration: [ { name: 'private-subnet-1', subnetType: ec2.SubnetType.PRIVATE, cidrMask: 24, }, { name: 'public-subnet-1', subnetType: ec2.SubnetType.PUBLIC, cidrMask: 24, }, ] }); ``` Proposal: ``` const vpc = new ec2.Vpc(this, 'vpc-id', { maxAzs: 2, subnetConfiguration: [ { name: 'private-subnet-1', subnetType: ec2.SubnetType.PRIVATE, cidrMask: 24, }, { name: 'public-subnet-1', subnetType: ec2.SubnetType.PUBLIC, cidrMask: 24, mapPublicIpOnLaunch: false, // or true }, ] }); ```
…ets (aws#17346) **Issue (Fixes aws#14194, aws#16838 When creating a VPC you can define a SubnetConfiguration but it is not possible to define `mapPublicIpOnLaunch` for public subnets. VPC Example: ``` const vpc = new ec2.Vpc(this, 'vpc-id', { maxAzs: 2, subnetConfiguration: [ { name: 'private-subnet-1', subnetType: ec2.SubnetType.PRIVATE, cidrMask: 24, }, { name: 'public-subnet-1', subnetType: ec2.SubnetType.PUBLIC, cidrMask: 24, }, ] }); ``` Proposal: ``` const vpc = new ec2.Vpc(this, 'vpc-id', { maxAzs: 2, subnetConfiguration: [ { name: 'private-subnet-1', subnetType: ec2.SubnetType.PRIVATE, cidrMask: 24, }, { name: 'public-subnet-1', subnetType: ec2.SubnetType.PUBLIC, cidrMask: 24, mapPublicIpOnLaunch: false, // or true }, ] }); ```
Issue (Fixes #14194, #16838)
When creating a VPC you can define a SubnetConfiguration but it is not possible to define
mapPublicIpOnLaunch
for public subnets.VPC Example:
Proposal: