| layout | cloudstack |
|---|---|
| page_title | CloudStack: cloudstack_private_gateway |
| sidebar_current | docs-cloudstack-resource-private-gateway |
| description | Creates a private gateway. |
Creates a private gateway for the given VPC.
NOTE: private gateway can only be created using a ROOT account!
resource "cloudstack_private_gateway" "default" {
gateway = "10.0.0.1"
ip_address = "10.0.0.2"
netmask = "255.255.255.252"
vlan = "200"
vpc_id = "76f6e8dc-07e3-4971-b2a2-8831b0cc4cb4"
acl_id = "cf4f1dad-aade-4ccd-866c-0a2166e5be3d"
}Example with VLAN overlap check bypass:
resource "cloudstack_private_gateway" "with_bypass" {
gateway = "10.0.0.1"
ip_address = "10.0.0.2"
netmask = "255.255.255.252"
vlan = "200"
vpc_id = "76f6e8dc-07e3-4971-b2a2-8831b0cc4cb4"
acl_id = "cf4f1dad-aade-4ccd-866c-0a2166e5be3d"
bypass_vlan_overlap_check = true
}The following arguments are supported:
-
gateway- (Required) the gateway of the Private gateway. Changing this forces a new resource to be created. -
ip_address- (Required) the IP address of the Private gateway. Changing this forces a new resource to be created. -
netmask- (Required) The netmask of the Private gateway. Changing this forces a new resource to be created. -
vlan- (Required) The VLAN number (1-4095) the network will use. -
physical_network_id- (Optional) The ID of the physical network this private gateway belongs to. -
network_offering- (Optional) The name or ID of the network offering to use for the private gateways network connection. -
acl_id- (Required) The ACL ID that should be attached to the network. -
vpc_id- (Required) The VPC ID in which to create this Private gateway. Changing this forces a new resource to be created. -
bypass_vlan_overlap_check- (Optional) When set to true, bypasses the VLAN overlap check during private gateway creation. This allows creating private gateways with VLANs that may overlap with existing VLANs in the physical network. Defaults to false.
The following attributes are exported:
id- The ID of the private gateway.
Private gateways can be imported; use <PRIVATE GATEWAY ID> as the import ID. For
example:
terraform import cloudstack_private_gateway.default e42a24d2-46cb-4b18-9d41-382582fad309