aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(ec2): network interface definitions for launch templates

Open watersry opened this issue 7 months ago • 1 comments

This PR implements basic functionality for defining network interfaces as part of Launch Template.

I'm just reviving https://github.com/aws/aws-cdk/pull/29875 to try and get those changes merged. All the work was done by @pasiorovuo, I made some modifications to try and address the feedback from his original PR.

Issue # (if applicable)

Fixes https://github.com/aws/aws-cdk/issues/14494

Reason for this change

Current Launch Template L2 is missing the ability to define multiple interfaces, their subnets etc. This functionality is required in advanced scenarios where instances need multiple public IP addresses or need to be multi-homed etc. Description of changes

Multiple new types have been introduced in packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts. Many of them are just renamed extends of the ec2-generated types. This made sense as the Cloudformation type definition is suitable, but I'm a bit uncertain if this violates the design requirement Do not “leak” the details or types of the CFN layer when defining your construct API.

Main type is NetworkInterface which defines the attributes for the interfaces. Additional changes are in LaunchTemplate constructor to accommodate the new functionality.

README has been updated to include a simple usage example.

Description of how you validated changes

A single test has been added. I have also verified the implementation by creating stacks in different configurations and deployed them. There too many combinations to check them all, so only a subset has been tested, unfortunately.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

watersry avatar May 01 '25 13:05 watersry

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: c29affdde5513952654da259383134770a6953f3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar May 01 '25 20:05 aws-cdk-automation

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing

To prevent automatic closure:

  • Resume work on the PR
  • OR request an exemption by adding a comment containing 'Exemption Request' with justification e.x "Exemption Request: "
  • OR request clarification by adding a comment containing 'Clarification Request' with a question e.x "Clarification Request: "

This PR will automatically close in 14 days if no action is taken.

aws-cdk-automation avatar Jul 10 '25 00:07 aws-cdk-automation

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

aws-cdk-automation avatar Jul 24 '25 00:07 aws-cdk-automation

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Jul 24 '25 00:07 github-actions[bot]