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
Change "Prefix Too Large" Behavior? #4
Comments
An alternative to changing the behavior of aws-cidr-finder --profile myprofile --prefix 18 --filter |
Adding filter seems like a good solution, but also I don't know if someone looking for a subnet with a certain CIDR would care if it runs into a block it checked that was of an incompatible size, only if there were no available blocks for their specified prefix. Of course, this is from my perspective and use-case where I'm breaking up a VPC to create a subnet with Terraform at launch time. I found this issue because I got the error you listed; the first available block sequentially in my VPC is a /28, but I'm looking for /25s. Whatever you decide, thanks for making and working on this! |
Thanks for the input @DacoDev. I will make this change. Edit: the change described in the root post of this issue is now available in |
Thank you @cooperwalbrun! |
I will need to gather some input from others on this. The idea is that instead of erroring out when an "invalid" prefix is specified, e.g.:
...the results list could just be scrubbed of any CIDRs that do not satisfy the criteria. For example, if the
aws-cidr-finder
command would return172.0.0.0/20, 172.0.16.0/18, 172.45.0.0/32
and we specify--prefix 18
, the only result would be172.0.16.0/18
because that is the only returned CIDR that is large enough to have the desired prefix.The text was updated successfully, but these errors were encountered: