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

Unused route table created when creating a subnet #3604

Closed
1 of 5 tasks
Kent1 opened this issue Aug 9, 2019 · 9 comments
Closed
1 of 5 tasks

Unused route table created when creating a subnet #3604

Kent1 opened this issue Aug 9, 2019 · 9 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/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@Kent1
Copy link

Kent1 commented Aug 9, 2019

  • I'm submitting a ...

    • πŸͺ² bug report
    • πŸš€ feature request
    • πŸ“š construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    When i create a Subnet, and change the RouteTableAssociation to an existing route table, an unused route table is created along with the subnet.

  • What is the expected behavior (or behavior of feature suggested)?
    I would like to be able to remove this route table or that cdk is smart enough to not create it

  • Please tell us about your environment:

    • CDK CLI Version: 1.3.0
    • Module Version: 1.3.0
    • OS: [OSX Mojave]
    • Language: [Java]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Subnet Subnet = new Subnet(this, "Subnet", SubnetProps.builder()
        .withVpcId(vpc.getVpcId())
        .withAvailabilityZone("eu-west-1b")
        .withCidrBlock(String.format("10.%d.43.128/25", environmentId))
        .build());

CfnSubnetRouteTableAssociation routeTableAssociation = (CfnSubnetRouteTableAssociation) subnet.getNode().tryFindChild("RouteTableAssociation");
routeTableAssociation.setRouteTableId(Fn.importValue(String.format("%s-nat-nat000", environment)));

CfnRouteTable cfnRouteTable = (CfnRouteTable) subnet.getNode().tryFindChild("RouteTable");
@Kent1 Kent1 added the needs-triage This issue or PR still needs to be triaged. label Aug 9, 2019
@eladb eladb added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Aug 13, 2019
@NGL321 NGL321 added bug This issue is a bug. language/java Related to Java bindings needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 14, 2019
@rix0rrr rix0rrr added feature-request A feature should be added or improved. and removed bug This issue is a bug. labels Aug 21, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 21, 2019

I'm not sure this counts as a bug.

Unfortunately, the Subnet construct right now is heavily tied to the Vpc construct, and supports exactly the features it needs.

This sounds like a feature request for an optional RouteTable input parameter to Subnet.

@konstantinj
Copy link

#4308 RouteTable input would be appreciated.
Not only in SubnetProps but also in subnetConfiguration so it can be used directly in the VPC construct.

@SomayaB SomayaB removed the needs-reproduction This issue needs reproduction. label Oct 22, 2019
@rix0rrr rix0rrr added effort/medium Medium work item – several days of effort and removed language/java Related to Java bindings labels Jan 23, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 23, 2020

Related to #5927

@rix0rrr rix0rrr added the p2 label Aug 12, 2020
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@Obirah
Copy link

Obirah commented Feb 16, 2022

In TypeScript I was able to get rid of the RouteTable via subnet.node.tryRemoveChild('RouteTable');.

@github-actions
Copy link

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 Feb 16, 2023
@japerwu
Copy link

japerwu commented Jun 18, 2023

I wish this feature is there. subnet.node.tryRemoveChild('RouteTable') results in unresolved dependency in my CFN template as the subnet still tries to reference it.

@maggoun
Copy link

maggoun commented Jun 26, 2023

I want this feature, the ability to assign a route table to a created subnet

@Vulonus
Copy link

Vulonus commented Jul 25, 2023

i second this. i need a functionality like this. can we reopen the issue?

@Vulonus
Copy link

Vulonus commented Jul 25, 2023

nvm this could be fixed when implementing #4308

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/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

10 participants