» ucloud_vpc
Provides a VPC resource.
Note The network segment can only be created or deleted, can not perform both of them at the same time.
» Example Usage
resource "ucloud_vpc" "example" {
name = "tf-example-vpc"
tag = "tf-example"
# vpc network
cidr_blocks = ["192.168.0.0/16"]
}
» Argument Reference
The following arguments are supported:
-
cidr_blocks
- (Required) The CIDR blocks of VPC. -
name
- (Optional) The name of VPC. If not specified, terraform will autogenerate a name beginning withtf-vpc
. -
tag
- (Optional) A tag assigned to VPC, which contains at most 63 characters and only support Chinese, English, numbers, '-', '_', and '.'. If it is not filled in or a empty string is filled in, then default tag will be assigned. (Default:Default
). -
remark
- (Optional) The remarks of the VPC. (Default:""
).
» Attributes Reference
In addition to all arguments above, the following attributes are exported:
-
create_time
- The time of creation for VPC, formatted in RFC3339 time string. -
update_time
- The time whenever there is a change made to VPC, formatted in RFC3339 time string. -
network_info
- It is a nested type which documented below.
The attribute (network_info
) support the following:
-
cidr_block
- The CIDR block of the VPC.
» Import
VPC can be imported using the id
, e.g.
$ terraform import ucloud_vpc.example uvnet-abc123456