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

SubnetSelection: setting onePerAz to true, still returns all subnets from an AZ #24155

Closed
danblacklist opened this issue Feb 14, 2023 · 2 comments
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. duplicate This issue is a duplicate.

Comments

@danblacklist
Copy link

danblacklist commented Feb 14, 2023

Describe the bug

When using subnetSelection as below, it still returns all subnets from all AZs whereas it should be returning just one per AZ.

const subnetSelection = {
      subnetType: ec2.SubnetType.PUBLIC,
      onePerAz: true
    }

Even the below returns all subnets from all AZs

const subOne = ec2.Subnet.fromSubnetId(this, "subOne", "subnet-3e92bb31")
    const subnetSelection = {
      subnets: [
        subOne
      ]
    }

I'm unable to find a way to get it to contain just one subnet.

Expected Behavior

It should return one subnet per AZ

Current Behavior

Its returning all subnets from all AZs

Reproduction Steps

  1. Create a SubnetSelection with above properties.
  2. Use it inside cdk.aws_ecs_patterns.ApplicationLoadBalancedFargateServiceProps for taskSubnets
  3. BOOM

Possible Solution

No response

Additional Information/Context

This was also highlighted in a previous issue : #6217

CDK CLI Version

2.59.0 (build b24095d)

Framework Version

No response

Node.js Version

18.12.1.

OS

Mac OS Ventura 13.2

Language

Typescript

Language Version

No response

Other information

No response

@danblacklist danblacklist added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Feb 14, 2023
@peterwoodworth peterwoodworth added duplicate This issue is a duplicate. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 14, 2023
@peterwoodworth
Copy link
Contributor

Thanks for raising this issue with us,

We have an open issue tracking this issue here #3126, please refer to that issue and use it for any other concerns. Thanks!

@peterwoodworth peterwoodworth closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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 bug This issue is a bug. duplicate This issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants