google::compute-subnet¶
Creates a subnet.
Example¶
google::compute-subnet subnet-example
name: "subnet-example"
description: "subnet-example-description"
ip-cidr-range: "10.0.0.0/16"
network: $(google::compute-network network-example-subnet)
region: "us-east1"
end
Attributes¶
| Attribute | Description |
|---|---|
| name | The name of the subnet. (Required) |
| description | The description of the subnet. |
| ip-cidr-range | The IPv4 network range for the subnet, in CIDR notation. (Required) |
| network | The network to create this subnet in. (Required) |
| region | The region to create this subnet in. (Required) |
| enable-flow-logs | When true, enables flow logs. Defaults to false. |
| private-ip-google-access | When true, allows virtual machines in this subnet that only have private IPs to access Google APIs and services. Defaults to false. See Configuring Private Google Access. |
| secondary-ip-range list subresource | The secondary IP ranges that may be allocated for this subnet.
|
| log-config | The log config for this subnetwork. Can only be set if enable-flow-logs is set. |
Outputs¶
| Attribute | Description |
|---|---|
| id | The Id of the subnet. |
| self-link | The fully-qualified URL linking back to the subnetwork. |