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

Assign AZs to a VPC/Subnet #1037

Closed
moofish32 opened this issue Oct 29, 2018 · 10 comments
Closed

Assign AZs to a VPC/Subnet #1037

moofish32 opened this issue Oct 29, 2018 · 10 comments
Assignees
Labels
docs/generated Related to the generated API Reference documentation guidance Question that needs advice or information.

Comments

@moofish32
Copy link
Contributor

Separating from: #996 (comment)

As a VPC designer I would like to be able to assign a specific subset of availability zones to a VPC. This is specifically helpful in us-east-1.

@rix0rrr rix0rrr added the feature-request A feature should be added or improved. label Nov 6, 2018
@eladb
Copy link
Contributor

eladb commented Jan 7, 2019

Can we add a bit of context/motivation here? I.e why would you want to do that?

@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 7, 2019

Two reasons I can think of:

  1. There is a particular AZ in us-east-1 which does not have all the features that the other AZs have. For example, it is not possible to start EKS clusters there, and there's probably more.
  2. If you're creating multiple VPCs in the same account, you might want to spread out your VPCs over the AZs like (us-east-1a, b, c), (d, e, f), as opposed to not doing this which would lead to the VPCs spreading over (us-east-1a, b, c), (a, b, c)

@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 14, 2019

This is news to me, but important when implementing this ticket:

@rob-gonz
Copy link

rob-gonz commented Jan 15, 2019

For additional Context/Motivation:

  • For some QA environments I only want 1 instance inside my ASG and I do not want this ASG in 6 AZ's thus increasing my cost 5x more then necessary.

  • Even for production, I don't need to be in every AZ. I only want to be in 1, 2, or 3 for some applications that are only for internal purposes.

@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 15, 2019

@rob-gonz, I think your issue might be solved by #1543, unless you want more fine-grained control over placement

@rob-gonz
Copy link

rob-gonz commented Jan 15, 2019

Wow, you guys are fast. Additional fine-grained control would just be a 'nice to have' for me at this point. #1543 should solve my issue.

Edit: It solves my issue for production. Is there a parameter I can input to change the default to be '1' AZ for a given stack/ASG/(or other more appropriate construct). e.g. for a QA/Test stack

@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 15, 2019

I'm confused on the ASG requirement.

You can limit the number of AZs in a VPC using the maxAZs property (set it to 1 if you want a cheap VPC).

ASGs will spread over all AZs in the VPC, but you can still create 1 instance even in a VPC with 3 AZs (by setting maxCapacity to 1), so they scale independently.

@rob-gonz
Copy link

I must have missed the existence of the maxAZs property.

...you can still create 1 instance even in a VPC with 3 AZs (by setting maxCapacity to 1),

It didn't click for me that maxCapacity was across all AZ's. Somehow I had it stuck in my head that it was per AZ.

Thanks for taking the time to point the above out.

@eladb
Copy link
Contributor

eladb commented Jan 15, 2019

It didn't click for me that maxCapacity was across all AZ's. Somehow I had it stuck in my head that it was per AZ.

Probably worth clarifying in the docs

@SomayaB SomayaB assigned rix0rrr and SomayaB and unassigned rix0rrr Sep 10, 2019
@SomayaB SomayaB added the docs/repo-general Related to repo documentation (CONTRIBUTING, CODE_OF_CONDUCT, etc.) label Sep 10, 2019
@SomayaB
Copy link
Contributor

SomayaB commented Sep 17, 2019

Information on MaxAZs is here. Closing issue.

@SomayaB SomayaB closed this as completed Sep 17, 2019
@SomayaB SomayaB added guidance Question that needs advice or information. docs/generated Related to the generated API Reference documentation and removed feature-request A feature should be added or improved. docs/repo-general Related to repo documentation (CONTRIBUTING, CODE_OF_CONDUCT, etc.) labels Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/generated Related to the generated API Reference documentation guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

5 participants