This module is used to create a VPC
data "ibm_resource_group" "resource_group" {
name = (var.resource_group != null ? var.resource_group : "default")
}
module "vpc" {
source = "terraform-ibm-modules/vpc/ibm//modules/vpc"
create_vpc = var.create_vpc
vpc_name = var.vpc_name
resource_group_id = data.ibm_resource_group.resource_group.id
default_address_prefix = var.default_address_prefix
default_network_acl_name = var.default_network_acl_name
default_security_group_name = var.default_security_group_name
default_routing_table_name = var.default_routing_table_name
vpc_tags = var.vpc_tags
address_prefixes = var.address_prefixes
locations = var.locations
subnet_name = var.subnet_name
number_of_addresses = var.number_of_addresses
vpc = var.vpc
create_gateway = var.create_gateway
public_gateway_name = var.public_gateway_name
floating_ip = var.floating_ip
gateway_tags = var.gateway_tags
}
Name | Version |
---|---|
terraform | >= 1.3.0 |
ibm | >= 1.64.0, < 2.0.0 |
No modules.
Name | Type |
---|---|
ibm_is_public_gateway.pgws | resource |
ibm_is_subnet.subnets | resource |
ibm_is_vpc.vpc | resource |
ibm_is_vpc_address_prefix.vpc_address_prefixes | resource |
ibm_is_vpc.vpc_ds | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
address_prefixes | List of Prefixes for the vpc | list(object({ |
[] |
no |
clean_default_sg_acl | Remove all rules from the default VPC security group and VPC ACL (less permissive) | bool |
false |
no |
create_gateway | True to create new Gateway | bool |
false |
no |
create_vpc | True to create new VPC. False if VPC is already existing and subnets or address prefixies are to be added | bool |
true |
no |
default_address_prefix | Default address prefix creation method | string |
"auto" |
no |
default_network_acl_name | Name of the Default ACL | string |
null |
no |
default_routing_table_name | Name of the Default Routing Table | string |
null |
no |
default_security_group_name | Name of the Default Security Group | string |
null |
no |
floating_ip | Floating IP id 's or address 'es that you want to assign to the public gateway |
map(string) |
{} |
no |
gateway_tags | List of Tags for the gateway | list(string) |
[] |
no |
locations | zones per region | list(string) |
[] |
no |
number_of_addresses | Number of IPV4 Addresses | number |
null |
no |
public_gateway_name_prefix | Prefix to the names of the Public Gateways | string |
null |
no |
resource_group_id | ID of resource group. | string |
null |
no |
subnet_name_prefix | Prefix to the names of subnets | string |
null |
no |
vpc | Name of the Existing VPC to which subnets, gateways are to be attached, only used when var.create_vpc is false |
string |
null |
no |
vpc_name | Name of the vpc | string |
null |
no |
vpc_tags | List of Tags for the vpc | list(string) |
[] |
no |
Name | Description |
---|---|
public_gateway_ids | The IDs of the Public Gateways |
subnet_detail_list | A list of subnets containing names, CIDR blocks, and zones. |
subnet_ids | The IDs of the subnets |
subnet_zone_list | A list containing subnet IDs and subnet zones |
vpc_address_prefixes | The Address Prefixes of the VPC |
vpc_address_prefixes_cidr | The Address Prefix CIDRs of the VPC |
vpc_default_network_acl | The ID of the vpc default network acl |
vpc_default_routing_table | The ID of the vpc default Routing Table |
vpc_default_security_group | The ID of the vpc default security group |
vpc_id | The ID of the vpc |