-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
More flexibility for subnets #892
Comments
This issue has been automatically marked as stale because it has been open 30 days |
It would also be incredibly helpful if you could explicitly configure which Availability Zone a Subnet is placed, as opposed to the current behaviour whereby the |
I believe this could be used for this also - #900 |
^ I referenced in a few other issues where 'more flexibility' could potentially be a solution. It seems like some people are using some of the other subnet types, but not for their actual use, just to 'group' subnets for other uses together. Myself, I was using the Now, those pre-defined types/use-cases can definitely be useful but perhaps in a format similar to what was expressed by the OP, one could specify In that same vein, it'd be nice to group certain types of subnets together in groups. Again, I was using Also, associated resources can't seemingly be named. I tried switching my I was considering adding at least an It also would definitely be great to be able to adjust the assignment of AZs for subnets; in most cases, I don't mind how it works now, however it's not super flexible. Also, especially for IPv6, there can be issues; one example is with Wavelength zones - these can only have IPv4 subnets; you can still have a dualstack vpc no problem but the module will try to associate an IPv6 subnet to coincide with the previously definied IPv4 subnet for WLZ, thus causing the AWS API to error out and preventing VPC creation if using dualstack and WLZ together; one can use the subnet resource separately to create it after the VPC has been created but I try to always find a solution with the module before using a resource directly if I can. If implemented, this would obviously be a semi-large and likely breaking change unless it's added as a new subnet type or the implementation is intentionally made backwards-compatible. Thus, I think it's prudent that anyone who wants more flexibility or has felt limited by the existing subnet configuration implementation should speak up and add their thoughts. |
@adamretter & @ForbiddenEra I suspect that since AWS intentionally scrambles the order of az_id mapping to az_name that this won't make it into a release but you could do something like this outside the module if you really need to ensure that your subnets are created in a specific az due to known capacity etc but it does somewhat undermine the aim of scattering folks into different azs instead of everyone choosing 1,2,3 in that order data "aws_availability_zones" "available" {} |
The current round-robin implementation works fine for me in most cases and likely in most cases in general. Where it falls apart is if you're also using something like a Wavelength zone or if you wanted extra subnets in a particular AZ; I don't particularly see the usefulness of this myself in most cases as generally you want everything duplicated in each AZ - other than the WLZ, the only case I personally have for this is a tiny subnet tied to az1 linked to a certain node with a meme IP but this is still do-able w/the current implementation (it's just added as the last subnet in the list). That said, additional subnet flexibility should still be a thing! |
This issue has been automatically marked as stale because it has been open 30 days |
This issue was automatically closed because of stale in 10 days |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Is your request related to a problem? Please describe.
There is a possibility this module will take into account to move subnets from list + global variables to maps ?
Using subnets as lists of cidrs and then other lists for subnets properties (like name) and other global as map_public_ip_on_launch make more hard to change infrastructure once created.
Describe the solution you'd like.
Using Maps instead of lists like this for subnets and route tables, e.g.:
The text was updated successfully, but these errors were encountered: