/terraform-aws-regional-cidrs

Terraform Module: Regional CIDRs for AWS

Primary LanguageHCLApache License 2.0Apache-2.0

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
  • Terraform 1.6.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  = "ksatirli/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.

Author Information

This repository is maintained by the contributors listed on GitHub.

License

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

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

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express or implied.

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