Skip to content

workloads/terraform-aws-regional-cidrs

Regional Predictable CIDRs for AWS VPCs

This module manages the lifecycle of regional, predictable AWS-specific CIDRs for @workloads.

Table of Contents

Requirements

  • Amazon Web Services (AWS) Account
  • HashiCorp Terraform 1.9.x or newer

Development

For development and testing of this repository:

  • terraform-docs 0.18.0 or newer

Usage

This module depends on a correctly configured AWS Provider in your Terraform codebase.

Usage

Add the module to your Terraform resources like so:

module "regional_cirs" {
  source  = "workloads/regional-cidrs/aws"
  version = "1.0.0"
}

Then, fetch the module from the Terraform Registry using terraform get.

Additional usage examples are available in the examples directory via GitHub.

Inputs

Name Description Type Required
cidr_base Base Octet of CIDR block. number no
cidr_map Mapping of CIDR data by AWS Region.
object({
geo = map(number)
cardinality = map(number)
})
no
cidr_prefix Prefix of CIDR block. number no

Outputs

Name Description
aws_regions Exported Attributes for aws_regions.main data source.
cidr_map List of Region-specific CIDR Octets.
cidrs List of Region-specific CIDRs.
region_map Results of Region Mapping.
regular_expression_patterns Regular Expression patterns for matching AWS Regions.

Contributors

For a list of current (and past) contributors to this repository, see GitHub.

License

Licensed under the Apache License, Version 2.0 (the "License").

You may download a copy of the License at apache.org/licenses/LICENSE-2.0.

See the License for the specific language governing permissions and limitations under the License.

Contributors

Languages