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
ELB cannot be attached to multiple subnets in the same AZ #25
Comments
The |
@synhershko, unfortunately, the way data pulls currently it does not differentiate between public and private subnets hence the error where multiple subnets from the same AZ are being used. |
In my case I went the opposite way and removed pulling availability_zones and subnets as data. We had subnets in our VPC I didn't want to use here so I made another var for subnets. I think this approach covers more use cases, would you merge it in if I open PR? |
@pranas sure, how would that work though? pulling AZs via data only if no var value was specified? |
You could do the same thing as you did with AZs here. However, I actually went the stupid simple way by just requiring putting subnets in variables. I even deleted the forementioned code and require AZs in variables as well to make things simpler. |
I was able to overcome this issue with by separating it to two different sections filtered by tag, so the ELB will be created using the correct public subnets and the instances will be created in the private subnets:
|
I'm facing this problem as well. What is the recommended workaround? |
@tomerleib I'm trying your workaround but could you elaborate as to how to modify the other files after implementing the change mentioned above? |
Fixed by f776fb5 |
Current Setup:
When explicitly specifying a list of availability zones through the "availability_zone" variable and subsequently defining the private subnets in those associated zones deployment through the "vpc_subnets" variable fails with the message below:
This is likely due to vpc subnets being pulled automatically from the VPC and availability_zone variable not being respected. Unless it is a design feature that needs to be documented.
workaround:
The text was updated successfully, but these errors were encountered: