Skip to main content
Providers

VpcNetwork

A resource of the GCP provider, version 0.2.0, in its Networking group. Import it with:

import VpcNetwork from "gcp/networking"

Example

resource VpcNetwork example {
    name                  = "example-value"
    autoCreateSubnetworks = true
    routingMode           = "REGIONAL"
    description           = "example-value"
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoThe name of the network
autoCreateSubnetworksbooleantrueNoWhether to automatically create subnetworks in each region
routingModestring"REGIONAL"NoThe network-wide routing mode Allowed: "REGIONAL", "GLOBAL"
descriptionstring—NoAn optional description of the network

Set by GCP after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
networkIdstringYesThe unique network ID assigned by GCP
selfLinkstringNoThe self-link URL of the network
creationTimestampstringNoThe creation timestamp of the network

On this page