-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
(aws-ec2): Need to be able to freely configure network interfaces in L2 LaunchTemplate #30891
Comments
Something I just realized is that there might not be a L2 abstraction for the launch template network interfaces https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterface.html Note: This is different than EC2 network interfaces https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterface.html |
Hi @chenhe95 ,thanks for reaching out. You could always use the Escape hatches to pass the desired properties to Cloudformation L1 construct directly,you could use CfnInstance and set the netowrkinterface the way you would like. Please let me know if that would solve your usecase. If it doesn't, and you would still like to propose a L2 construct, we have a set procedure for that. You would have to submit an RFC and get the approval on design and after review and acceptance by the Core team, you could proceed with contribution. However this whole contribution process is currently under review and being reassessed. Please feel free to check this ReadMe on L2 construct submission.. |
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. |
Thanks, I'll look into the L2 construct submission |
@khushail Is this actually a L2 construct or is this just a regular typescript
|
I'm reading through the RFC documents and the aws-cdk/docs/DESIGN_GUIDELINES.md Lines 139 to 147 in e4fdb02
|
Would |
Thanks! #29875 basically solves my issue if it would be merged |
Describe the feature
I'd like it if I could be able to just pass in the
networkInterfaces
to the underlying L1 construct from the L2 constructor, instead of the L2 construct creating the networkInterfaces for me, which doesn't have all of the things I'd like to put in.The current launch template behavior of deciding the network interface doesn't really work for me https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts#L734-L736
Use Case
To not be limited to only network interfaces with a device index of 0 with a configured
associatePublicIpAddress
. To be able to use the entirety of NetworkInterfaceProperty for my L2 LaunchTemplate constructProposed Solution
Change the LaunchTemplate behavior as follows
networkInterfaces?
field to theLaunchTemplateProps
, same as the L1 versionnetworkInterfaces
is provided, do not create the network interfaces on this lineAnd also do not create the
securityGroupsToken
And also pass in the provided props networkInterfaces to
CfnLaunchTemplate
and pass in undefined tosecurityGroupIds
3. If
associatePublicIpAddress
is provided through the props butnetworkInterfaces
is not provided through props, retain the current behavior as ifassociatePublicIpAddress
is provided.4. If neither are provided through props, retain the current behavior as if
associatePublicIpAddress
is not provided5. If both
associatePublicIpAddress
andnetworkInterfaces
are provided through props, then there is a conflict as there are 2 sources of truth. We could throw an errorthrow new Error('You cannot provide both a networkInterfaces and an associatePublicIpAddress');
Other Information
No response
Acknowledgements
CDK version used
1.148.0
Environment details (OS name and version, etc.)
Mac OS Sonoma 14.5
The text was updated successfully, but these errors were encountered: