Skip to content

AutoScalingGroupProps.AssociatePublicIpAddress has no effect #21576

@icelava

Description

@icelava

Describe the bug

https://docs.aws.amazon.com/cdk/api/v2/dotnet/api/Amazon.CDK.AWS.AutoScaling.AutoScalingGroupProps.html#Amazon_CDK_AWS_AutoScaling_AutoScalingGroupProps_AssociatePublicIpAddress

Setting property to false still results in instances launched with public IP address.

Expected Behavior

Launched instances should not assign public IP address.

Current Behavior

Launched instances get public IP address.

Reproduction Steps

this.asg = new AutoScalingGroup(this, this.asgName, new AutoScalingGroupProps
{
	AutoScalingGroupName = this.asgName,
	LaunchTemplate = lt,
	Vpc = this._props.Vpc,
	VpcSubnets = this._props.AppSubnets,
	AssociatePublicIpAddress = false,
	MinCapacity = this._props.MinCapacity,
	MaxCapacity = this._props.MaxCapacity,
	DesiredCapacity = this._props.DesiredCapacity
});

Possible Solution

That property should cause a change in the resultant CloudFormation template.

Additional Information/Context

No response

CDK CLI Version

2.35.0

Framework Version

.NET Core 3.1

Node.js Version

NA

OS

Windows

Language

.NET

Language Version

C# 8

Other information

No response

Metadata

Metadata

Labels

@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingbugThis issue is a bug.effort/smallSmall work item – less than a day of effortin-progressThis issue is being actively worked on.p2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions