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. See Configuring Private Google Access. Defaults to false.

Outputs

Attribute Description
id The Id of the subnet.
self-link The fully-qualified URL linking back to the subnetwork.