aws_ec2: assigning of public IP is not disabled #26120
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
I want to deploy ec2 instance into public subnet but disable the assignment of public IP.
Since the instances are part of ASG first I tried with
But since I define ASG via mixed_instances_policy and launch_template props, I got an error
There is no prop in ec2.LaunchTemplate to disable the public ip, so I went to the subnet configuration
After I've re-deployed the stack, Auto-assign public IPv4 address was still set to Yes and the instance was assigned the public IP.
Expected Behavior
Current Behavior
See section "Describe the bug"
Reproduction Steps
EC2 instance must be deployed in the public subnet, where subnet setting defined as follows
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.85.0
Framework Version
No response
Node.js Version
18
OS
Ubuntu 20.04
Language
Python
Language Version
3.10.6
Other information
No response
The text was updated successfully, but these errors were encountered: