feat(aws-autoscaling): Support a external LaunchConfiguration and LaunchTemplate to AutoScalingGroup#1404
feat(aws-autoscaling): Support a external LaunchConfiguration and LaunchTemplate to AutoScalingGroup#1404cohalz wants to merge 4 commits intoaws:masterfrom
Conversation
|
@cohalz this is awesome, but we generally avoid "leaking" the Cfn classes in the API of AWS constructs. Granted, this is a large surface area to cover, but also an opportunity to actually provide a lot of value to users. As a workaround, users can use property overrides, so I hope you are not blocked by this. Let me know if you wish to take this to the next level. It's not a small project, I am aware 😄 |
|
I tried this code. const asgResource = asg.findChild('ASG') as autoscaling.cloudformation.AutoScalingGroupResource
asgResource.addPropertyDeletionOverride('LaunchConfigurationName')
asgResource.addPropertyOverride('LaunchTemplate', {
LaunchTemplateId: appLaunchTemplate.ref,
Version: '1'
})It's working, but |
This actually brings up a missing feature in our "escape hatching" mechanism. You want to be able to delete an entire resource from a subtree. Raised #1408 If your current use case is to only be able to pass in a Would that make sense? |
|
I agree we should either limit the scope of this change, or implement a proper Launch Configuration construct. |
|
@cohalz closing for now. Feel free to reopen when/if you wish to continue this work. |
|
Would this be worth revisiting now that we have #12385 ? |
Fixed #1403
Pull Request Checklist
Please check all boxes, including N/A items:
Testing
Documentation
Title and description
fix(module): <title>bug fix (patch)feat(module): <title>feature/capability (minor)chore(module): <title>won't appear in changelogbuild(module): <title>won't appear in changelogBREAKING CHANGE: <describe exactly what changed and how to achieve similar behavior + link to documentation/gist/issue if more details are required>Fixes #xxxorCloses #xxxBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.