-
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
AutoScalingGroupProps.AssociatePublicIpAddress has no effect #21576
Comments
We're passing this prop directly to the LaunchTemplate resource - You can see a more full description of the underlying behavior of this prop here
Does this mean that if you alternate this value between true and false that you aren't seeing a difference in the resulting template? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Yeap it was originally not set, so defaulted to true. When I set it to false, no change in the resulting CloudFormation template. |
This property isn't supposed to be used when passing in your own launch template to a new ASG. We are supposed to throw an error here, but there's a bug in the logic which prevents that. I've made a PR which updates the documentation for all props which can't be used when specifying a launch template, as well as ensures an error gets thrown when this prop is set to false |
Hmmm but the LaunchTemplate does not feature such a property? |
…et to false when specifying launchTemplate (#21714) Setting `associatePublicIpAddress` prop when also setting `launchTemplate` prop on a new ASG is supposed to throw an error, but doesn't due to `associatePublicIpAddress` being a boolean, and the error message not triggering if a falsy value is used for the prop. This PR will ensure an error is thrown when `associatePublicIpAddress` is set, even when the value passed is falsy. It also updates the documentation on all props which conflict with `launchTemplate` or `mixedInstancesPolicy` fixes: #21576 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…et to false when specifying launchTemplate (aws#21714) Setting `associatePublicIpAddress` prop when also setting `launchTemplate` prop on a new ASG is supposed to throw an error, but doesn't due to `associatePublicIpAddress` being a boolean, and the error message not triggering if a falsy value is used for the prop. This PR will ensure an error is thrown when `associatePublicIpAddress` is set, even when the value passed is falsy. It also updates the documentation on all props which conflict with `launchTemplate` or `mixedInstancesPolicy` fixes: aws#21576 ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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
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
The text was updated successfully, but these errors were encountered: