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

Creating subnets in regions with only 2 availability zones fails #28

Open
wombat opened this issue Jan 29, 2017 · 2 comments
Open

Creating subnets in regions with only 2 availability zones fails #28

wombat opened this issue Jan 29, 2017 · 2 comments

Comments

@wombat
Copy link
Contributor

wombat commented Jan 29, 2017

I wanted to create a vpc with subnets and an etcd cluster in the Frankfurt region but it fails because only 2 availability zones exist and terraform always tries to create 3 subnets.
I manually solved this by deleting all references to subnet_2 in my local copy but I think it would be cool to have a general switch as there are regions with 2, 3 and 4 availability zones.

See: https://github.com/jsonmaur/aws-regions

@xuwang
Copy link
Owner

xuwang commented Feb 1, 2017

@w0mbat This is a little tricky I think. Terraform resource names are static. It means subnets resource tf files and other terraform files that reference the subnet variables have to be generated with scripts, making it complicated and hard to understand. I try to cut-down script glues and use Terraform whenever possible. I know it is painful now have to manually customize vpc/zones/subnets resource definitions... let me know if you have any thoughts better ideas to implement this. Thanks!

@xuwang
Copy link
Owner

xuwang commented May 28, 2017

@w0mbat Thanks for your feedback and we've Implemented dynamic subnet creation in https://github.com/xuwang/kube-aws-terraform repo. If you are still still interested in porting that code back to this repo, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants