Skip to content

Latest commit

 

History

History

workload-vpc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Landing Zone workload VPC (standalone)

This specialized submodule calls the root landing-zone-vpc module with a preset configuration that results in a workload VPC with a topology that is identical to the workload VPC that is created by the terraform-ibm-landing-zone module.

You can use this submodule when you need more modularity to create your topology than the terraform-ibm-landing-zone module provides. This submodule provides one of the building blocks for this topology.

See the Landing Zone example for runnable code.

Usage

module workload_vpc {
  source              = "terraform-ibm-modules/landing-zone-vpc/ibm//modules/workload-vpc"
  version             = "X.X.X" # replace X.X.X with a release version to lock into an exact release
  name                = "workload"
  region              = "us-south"
  prefix              = "workload-vpc"
}

Requirements

Name Version
terraform >= 1.3.0

Modules

Name Source Version
workload_vpc ../../ n/a

Resources

No resources.

Inputs

Name Description Type Default Required
access_tags Optional list of access tags to add to the VPC resources that are created list(string) [] no
address_prefixes Use address_prefixes only if use_manual_address_prefixes is true otherwise prefixes will not be created. Use only if you need to manage prefixes manually.
object({
zone-1 = optional(list(string))
zone-2 = optional(list(string))
zone-3 = optional(list(string))
})
null no
classic_access Optionally allow VPC to access classic infrastructure network bool null no
clean_default_sg_acl Remove all rules from the default VPC security group and VPC ACL (less permissive) bool false no
create_authorization_policy_vpc_to_cos Set it to true if authorization policy is required for VPC to access COS bool false no
default_network_acl_name Override default ACL name string null no
default_routing_table_name Override default VPC routing table name string null no
default_security_group_name Override default VPC security group name string null no
default_security_group_rules Override default security group rules
list(
object({
name = string
direction = string
remote = string
tcp = optional(
object({
port_max = optional(number)
port_min = optional(number)
})
)
udp = optional(
object({
port_max = optional(number)
port_min = optional(number)
})
)
icmp = optional(
object({
type = optional(number)
code = optional(number)
})
)
})
)
[] no
enable_vpc_flow_logs Enable VPC Flow Logs, it will create Flow logs collector if set to true bool false no
existing_cos_bucket_name Name of the COS bucket to collect VPC flow logs string null no
existing_cos_instance_guid GUID of the COS instance to create Flow log collector string null no
network_acls List of network ACLs to create with VPC
list(
object({
name = string
add_ibm_cloud_internal_rules = optional(bool)
add_vpc_connectivity_rules = optional(bool)
prepend_ibm_rules = optional(bool)
rules = list(
object({
name = string
action = string
destination = string
direction = string
source = string
tcp = optional(
object({
port_max = optional(number)
port_min = optional(number)
source_port_max = optional(number)
source_port_min = optional(number)
})
)
udp = optional(
object({
port_max = optional(number)
port_min = optional(number)
source_port_max = optional(number)
source_port_min = optional(number)
})
)
icmp = optional(
object({
type = optional(number)
code = optional(number)
})
)
})
)
})
)
[
{
"add_ibm_cloud_internal_rules": true,
"add_vpc_connectivity_rules": true,
"name": "workload-acl",
"prepend_ibm_rules": true,
"rules": []
}
]
no
network_cidrs Network CIDR for the VPC. This is used to manage network ACL rules for cluster provisioning. list(string)
[
"10.0.0.0/8"
]
no
prefix The prefix that you would like to append to your resources string "workload" no
region The region to which to deploy the VPC string "au-syd" no
resource_group_id The resource group ID where the VPC to be created string n/a yes
subnets Object for subnets to be created in each zone, each zone can have any number of subnets
object({
zone-1 = list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
}))
zone-2 = list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
}))
zone-3 = list(object({
name = string
cidr = string
public_gateway = optional(bool)
acl_name = string
}))
})
{
"zone-1": [
{
"acl_name": "workload-acl",
"cidr": "10.40.10.0/24",
"name": "vsi-zone-1",
"public_gateway": false
},
{
"acl_name": "workload-acl",
"cidr": "10.40.20.0/24",
"name": "vpe-zone-1",
"public_gateway": false
}
],
"zone-2": [
{
"acl_name": "workload-acl",
"cidr": "10.50.10.0/24",
"name": "vsi-zone-2",
"public_gateway": false
},
{
"acl_name": "workload-acl",
"cidr": "10.50.20.0/24",
"name": "vpe-zone-2",
"public_gateway": false
}
],
"zone-3": [
{
"acl_name": "workload-acl",
"cidr": "10.60.10.0/24",
"name": "vsi-zone-3",
"public_gateway": false
},
{
"acl_name": "workload-acl",
"cidr": "10.60.20.0/24",
"name": "vpe-zone-3",
"public_gateway": false
}
]
}
no
tags List of tags to apply to resources created by this module. list(string) [] no
use_public_gateways For each zone that is set to true, a public gateway will be created in that zone
object({
zone-1 = optional(bool)
zone-2 = optional(bool)
zone-3 = optional(bool)
})
{
"zone-1": false,
"zone-2": false,
"zone-3": false
}
no

Outputs

Name Description
vpc_crn CRN of VPC created
vpc_id ID of VPC created
vpc_name VPC name