2014-12-10 22:20:52 +01:00
|
|
|
---
|
|
|
|
layout: "cloudstack"
|
|
|
|
page_title: "CloudStack: cloudstack_vpc"
|
|
|
|
sidebar_current: "docs-cloudstack-resource-vpc"
|
|
|
|
description: |-
|
|
|
|
Creates a VPC.
|
|
|
|
---
|
|
|
|
|
|
|
|
# cloudstack\_vpc
|
|
|
|
|
|
|
|
Creates a VPC.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
Basic usage:
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "cloudstack_vpc" "default" {
|
2017-02-18 23:48:50 +01:00
|
|
|
name = "test-vpc"
|
|
|
|
cidr = "10.0.0.0/16"
|
|
|
|
vpc_offering = "Default VPC Offering"
|
|
|
|
zone = "zone-1"
|
2014-12-10 22:20:52 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the VPC.
|
|
|
|
|
|
|
|
* `display_text` - (Optional) The display text of the VPC.
|
|
|
|
|
|
|
|
* `cidr` - (Required) The CIDR block for the VPC. Changing this forces a new
|
|
|
|
resource to be created.
|
|
|
|
|
2015-04-29 11:21:37 +02:00
|
|
|
* `vpc_offering` - (Required) The name or ID of the VPC offering to use for this VPC.
|
2014-12-10 22:20:52 +01:00
|
|
|
Changing this forces a new resource to be created.
|
|
|
|
|
2016-12-12 10:06:42 +01:00
|
|
|
* `network_domain` - (Optional) The default DNS domain for networks created in
|
|
|
|
this VPC. Changing this forces a new resource to be created.
|
2016-03-08 19:14:01 +01:00
|
|
|
|
2015-08-21 16:59:35 +02:00
|
|
|
* `project` - (Optional) The name or ID of the project to deploy this
|
|
|
|
instance to. Changing this forces a new resource to be created.
|
2015-10-08 10:03:55 +02:00
|
|
|
|
2015-04-29 11:21:37 +02:00
|
|
|
* `zone` - (Required) The name or ID of the zone where this disk volume will be
|
2014-12-10 22:20:52 +01:00
|
|
|
available. Changing this forces a new resource to be created.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the VPC.
|
|
|
|
* `display_text` - The display text of the VPC.
|
2015-10-08 10:03:55 +02:00
|
|
|
* `source_nat_ip` - The source NAT IP assigned to the VPC.
|