Improve subnet CIDR calculation (clone of #23) #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the prereq modules configure the vpc/cnet submodules in a way that the total VPC/VNet CIDR range is split up equally between the number of subnets created.
While this is a sound approach, it results in a networking layout that does not align with our recommended network settings (and the current "Create new VPC" feature of CDP) and may be a source of confusion. See also https://docs.cloudera.com/cdp-public-cloud/cloud/requirements-aws/topics/mc-aws-req-vpc.html
We should implement a logic where the user can select the size of the public/private (internal/gateway) subnets and the module calculates each subnet's CIDR range accordingly.
Defaults subnet sizes will be set according to the linked documentation (/19 for internal/private and /24 for public/CDP subnets)
This is a clone of PR #23, but all commits squashed into a single (signed) commit. It includes following original commits:
c59dc5f
d47b8b6
ddbdf93
f8a9e05
b0fe32c
04ec93b
0714cd3
5b3215c