Rolls-up large lists of CIDR ranges into a smaller list of Class B CIDR ranges. The idea of the module came from the limitation on Storage Accounts only allowing up to 200 CIDRs in it's Firewall. Many services have more possible CIDR ranges than this for example GitHub Actions have the potential of almost 1700 CIDR possiblities. Using this module will constrain the CIDRs to the count passed as a variable by rolling up smaller cidrs into larger ranges as needed.
For now this module only works with the GitHub Meta API's CIDRs for various features like; Actions, Dependabot, Git, Packages, etc. See the raw API, https://api.github.com/meta.
Important, if a range is rolled-up to fit the cidr_count_limit
understand that IP addresses not intended will be included in the output
only IPv4's are included since many Azure networking rules only accept these
refer to the example in examples\github_actions
module "github_action_cidrs" {
source = "github.com/trentmillar/terraform-networking-github-cidrs?ref=main"
cidr_type = "actions"
cidr_count_limit = 200
}
Name | Description | Options | Type | Default | Required |
---|---|---|---|---|---|
cidr_count_limit | Constrains the CIDRs returned. If there are more CIDRs than this limit CIDRs will be rolled up in Class B or A ranges | number | 200 | yes | |
cidr_type | Specify the service CIDR's returned | actions, api, hooks, web, git, packages, pages, importer, packages, dependabot | string | actions | yes |
Name | Description |
---|---|
cidrs | List of CIDR ranges that fit within the count limit |