Terraform module to provision subnets for an existing VPC. The number of subnets created depends on the value provided for _count
. The created subnets will be named after the vpc with a suffix based on the value provided for label
. Optionally, if values are provided for gateways
then the subnets will be created with a public gateway.
The module depends on the following software components:
- terraform - v13
- kubectl
- IBM Cloud provider >= 1.22.0
- Helm provider >= 1.1.1 (provided by Terraform)
This module makes use of the output from other modules:
- Resource Group - github.com/cloud-native-toolkit/terraform-ibm-container-platform.git
- VPC - github.com/cloud-native-toolkit/terraform-ibm-vpc.git
- Gateway - github.com/cloud-native-toolkit/terraform-ibm-vpc-gateways.git
module "dev_subnet" {
source = "github.com/cloud-native-toolkit/terraform-ibm-vpc-subnets.git?ref=v1.0.3"
resource_group_id = module.resource_groups.id
vpc_name = module.vpc.name
acl_id = module.vpc.acl_id
gateways = module.gateways.gateways
_count = var.vpc_subnet_count
region = var.region
label = var.label
ibmcloud_api_key = var.ibmcloud_api_key