Skip to content

daniel-butler-irl/terraform-ibm-vpc-subnets

 
 

Repository files navigation

IBM VPC Subnets

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.

Software dependencies

The module depends on the following software components:

Command-line tools

  • terraform - v13
  • kubectl

Terraform providers

  • IBM Cloud provider >= 1.22.0
  • Helm provider >= 1.1.1 (provided by Terraform)

Module dependencies

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

Example usage

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

About

Module to provision subnets in a VPC instance

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 90.7%
  • Shell 9.3%