Skip to content
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

(ec2): Support UserData interface in MultipartUserData #14346

Closed
1 of 2 tasks
ddneilson opened this issue Apr 23, 2021 · 2 comments
Closed
1 of 2 tasks

(ec2): Support UserData interface in MultipartUserData #14346

ddneilson opened this issue Apr 23, 2021 · 2 comments
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@ddneilson
Copy link
Contributor

Simply, provide a way-forward whereby attempting to use the add*Command methods inherited from UserData do not throw exceptions. Rather, invoking the methods on MultipartUserData passes the invocation through to a designated UserData object.

Use Case

CDK construct libraries (like https://github.com/aws/aws-rfdk) allow the customer to provide a UserData object into an L3 construct. That L3 construct may use the provided UserData object in the creation of Instances, AutoScaling Groups, etc, but also use methods on the UserData such as addCommands(), addS3DownloadCommand(), etc to set up initialization required by the L3 construct.

Having these methods on the MultipartUserData throw exceptions makes it awkward at best to integrate the class with these libraries. Without this change to MultipartUserData these libraries would be required to accept both a UserData and MultipartUserData property to support MultipartUserData -- commands would be added to the UserData, but the MultipartUserData would be used to actually render the Instance/ASG's -- and enforce, somehow, that the given UserData is a part in the given MultipartUserData. It's all very awkward.

Proposed Solution

I have a candidate PR prepped, and will be posting it momentarily.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@ddneilson ddneilson added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2021
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Apr 23, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented May 10, 2021

Good idea!

@rix0rrr rix0rrr added effort/small Small work item – less than a day of effort p2 labels May 10, 2021
@rix0rrr rix0rrr removed their assignment May 10, 2021
@ryparker ryparker removed the needs-triage This issue or PR still needs to be triaged. label Jun 1, 2021
mergify bot pushed a commit that referenced this issue Jun 4, 2021
Implements: #14346

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
Implements: aws#14346

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Jun 1, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 1, 2022
@github-actions github-actions bot closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants