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

aws-ec2: support subnet group names on fromVpcAttributes #31880

Open
2 tasks
jaecktec opened this issue Oct 24, 2024 · 3 comments
Open
2 tasks

aws-ec2: support subnet group names on fromVpcAttributes #31880

jaecktec opened this issue Oct 24, 2024 · 3 comments
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@jaecktec
Copy link
Contributor

jaecktec commented Oct 24, 2024

Describe the feature

When importing a VPC I'd like to support names for subnets.

Use Case

When multiple subnet groups for one network type (for example ISOLATED) exist I want to select a certain group using subnet selection.

Proposed Solution

extend fromVpcAttributes -> VpcAttributes so an import can look like this:

Vpc.fromVpcAttributes(this, 'Vpc', {
  vpcId: 'vpc-id',
  isolatedSubnetNames: [
    { subnetGroupName: 'Database', subnetId: 'subnet-database-1' },
    { subnetGroupName: 'Database', subnetId: 'subnet-database-2' },
    { subnetGroupName: 'App', subnetId: 'subnet-app-1' },
    { subnetGroupName: 'App', subnetId: 'subnet-app-2' },
  ],
});

Other Information

Right now it's only possible to import up to 3 different subnet groups, however there are instances where I want to have more subnet groups.

Acknowledgements

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

CDK version used

2.163.1

Environment details (OS name and version, etc.)

@jaecktec jaecktec added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 24, 2024
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Oct 24, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 24, 2024
@khushail
Copy link
Contributor

Thans @jaecktec for reaching out and requesting this. I see fromVPCAttributes is inherently implementing VPCAttributes so this should be feasible to do -

export interface VpcAttributes {

However I see subnetGroupName is provided in this interface.You can use subnetSelection method and import by subnet group name.

Marking this as P2 as its good to have and won't be immediately addressed by the team but would be on their radar. Contributions from community are also welcome.

@khushail khushail added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Oct 25, 2024
@jaecktec
Copy link
Contributor Author

Hey, yeah so how I get it is that you can import a single subnet group name - however I really don't see much value in that.

I would however like to import multiple different subnet group names.
So far I can only import three groups of subnets and give each a distinct name, however it is not possible to import lets say two subnet groups of type 'internal' with distinct names.

@khushail
Copy link
Contributor

@jaecktec , thanks for replying back with clarification around your usecase.

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 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

2 participants