Name | Type | Description | Sensitive | Default |
---|---|---|---|---|
prefix | string | Prefix to be added to the beginning of each subnet name | multizone-subnet | |
vpc_id | string | ID of VPC where subnets will be created | ||
region | string | Region where VPC will be created | us-south | |
subnets | object({ zone-1 = list(object({ name = string cidr = string public_gateway = optional(bool) })) zone-2 = list(object({ name = string cidr = string public_gateway = optional(bool) })) zone-3 = list(object({ name = string cidr = string public_gateway = optional(bool) })) }) | List of subnets for the vpc. For each item in each array, a subnet will be created. Items can be either CIDR blocks or total ipv4 addressess. Public gateways will be enabled only in zones where a gateway has been created | { zone-1 = [{ name = "subnet-a" cidr = "10.10.10.0/24" public_gateway = true }], zone-2 = [{ name = "subnet-b" cidr = "10.20.10.0/24" public_gateway = true }], zone-3 = [{ name = "subnet-c" cidr = "10.30.10.0/24" public_gateway = true }] } |
|
resource_group_id | string | Optional. Resource group ID | null | |
public_gateways | object({ zone-1 = string zone-2 = string zone-3 = string }) | Optional. A map of public gateway IDs. To not use a gateway in a specific zone, leave string empty. If public gateway IDs are provided, they will be used by any subnet created in the zone. | { zone-1 = "" zone-2 = "" zone-3 = "" } |
|
routing_table_id | string | Optional. Routing Table ID | null | |
acl_id | string | Optional. ACL ID to use for subnet creation | null |
Name | Description | Value |
---|---|---|
ids | The IDs of the subnets | [ for subnet in ibm_is_subnet.subnet: subnet.id ] |
detail_list | A list of subnets containing names, CIDR blocks, and zones. | { for zone_name in distinct([ for subnet in ibm_is_subnet.subnet: subnet.zone ]): zone_name => { for subnet in ibm_is_subnet.subnet: subnet.name => { id = subnet.id cidr = subnet.ipv4_cidr_block } if subnet.zone == zone_name } } |
zone_list | A list containing subnet IDs and subnet zones | [ for subnet in ibm_is_subnet.subnet: { name = subnet.name id = subnet.id zone = subnet.zone cidr = subnet.ipv4_cidr_block } ] |