google_vmwareengine_network_policy

Represents a network policy resource. Network policies are regional resources.

To get more information about NetworkPolicy, see:

Example Usage - Vmware Engine Network Policy Basic

resource "google_vmwareengine_network" "network-policy-nw" {
    name              = "standard-nw"
    location          = "global" 
    type              = "STANDARD"
    description       = "VMwareEngine standard network sample"
}

resource "google_vmwareengine_network_policy" "vmw-engine-network-policy" {
    location = "us-west1"
    name = "sample-network-policy"
    edge_services_cidr = "192.168.30.0/26"
    vmware_engine_network = google_vmwareengine_network.network-policy-nw.id
}

Example Usage - Vmware Engine Network Policy Full

resource "google_vmwareengine_network" "network-policy-nw" {
    name              = "standard-full-nw"
    location          = "global" 
    type              = "STANDARD"
    description       = "VMwareEngine standard network sample"
}

resource "google_vmwareengine_network_policy" "vmw-engine-network-policy" {
    location = "us-west1"
    name = "sample-network-policy-full"
    edge_services_cidr = "192.168.30.0/26"
    vmware_engine_network = google_vmwareengine_network.network-policy-nw.id
    description = "Sample Network Policy"
    internet_access {
        enabled = true
    }
    external_ip {
        enabled = true
    }
}

Argument Reference

The following arguments are supported:


The internet_access block supports:

The external_ip block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

NetworkPolicy can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import NetworkPolicy using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/networkPolicies/{{name}}"
  to = google_vmwareengine_network_policy.default
}

When using the terraform import command, NetworkPolicy can be imported using one of the formats above. For example:

$ terraform import google_vmwareengine_network_policy.default projects/{{project}}/locations/{{location}}/networkPolicies/{{name}}
$ terraform import google_vmwareengine_network_policy.default {{project}}/{{location}}/{{name}}
$ terraform import google_vmwareengine_network_policy.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.