gcp.vmwareengine.NetworkPolicy
Represents a network policy resource. Network policies are regional resources.
To get more information about NetworkPolicy, see:
Example Usage
Vmware Engine Network Policy Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network_policy_nw = new gcp.vmwareengine.Network("network-policy-nw", {
    name: "sample-network",
    location: "global",
    type: "STANDARD",
    description: "VMwareEngine standard network sample",
});
const vmw_engine_network_policy = new gcp.vmwareengine.NetworkPolicy("vmw-engine-network-policy", {
    location: "us-west1",
    name: "sample-network-policy",
    edgeServicesCidr: "192.168.30.0/26",
    vmwareEngineNetwork: network_policy_nw.id,
});
import pulumi
import pulumi_gcp as gcp
network_policy_nw = gcp.vmwareengine.Network("network-policy-nw",
    name="sample-network",
    location="global",
    type="STANDARD",
    description="VMwareEngine standard network sample")
vmw_engine_network_policy = gcp.vmwareengine.NetworkPolicy("vmw-engine-network-policy",
    location="us-west1",
    name="sample-network-policy",
    edge_services_cidr="192.168.30.0/26",
    vmware_engine_network=network_policy_nw.id)
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vmwareengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network_policy_nw, err := vmwareengine.NewNetwork(ctx, "network-policy-nw", &vmwareengine.NetworkArgs{
			Name:        pulumi.String("sample-network"),
			Location:    pulumi.String("global"),
			Type:        pulumi.String("STANDARD"),
			Description: pulumi.String("VMwareEngine standard network sample"),
		})
		if err != nil {
			return err
		}
		_, err = vmwareengine.NewNetworkPolicy(ctx, "vmw-engine-network-policy", &vmwareengine.NetworkPolicyArgs{
			Location:            pulumi.String("us-west1"),
			Name:                pulumi.String("sample-network-policy"),
			EdgeServicesCidr:    pulumi.String("192.168.30.0/26"),
			VmwareEngineNetwork: network_policy_nw.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var network_policy_nw = new Gcp.VMwareEngine.Network("network-policy-nw", new()
    {
        Name = "sample-network",
        Location = "global",
        Type = "STANDARD",
        Description = "VMwareEngine standard network sample",
    });
    var vmw_engine_network_policy = new Gcp.VMwareEngine.NetworkPolicy("vmw-engine-network-policy", new()
    {
        Location = "us-west1",
        Name = "sample-network-policy",
        EdgeServicesCidr = "192.168.30.0/26",
        VmwareEngineNetwork = network_policy_nw.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vmwareengine.Network;
import com.pulumi.gcp.vmwareengine.NetworkArgs;
import com.pulumi.gcp.vmwareengine.NetworkPolicy;
import com.pulumi.gcp.vmwareengine.NetworkPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var network_policy_nw = new Network("network-policy-nw", NetworkArgs.builder()
            .name("sample-network")
            .location("global")
            .type("STANDARD")
            .description("VMwareEngine standard network sample")
            .build());
        var vmw_engine_network_policy = new NetworkPolicy("vmw-engine-network-policy", NetworkPolicyArgs.builder()
            .location("us-west1")
            .name("sample-network-policy")
            .edgeServicesCidr("192.168.30.0/26")
            .vmwareEngineNetwork(network_policy_nw.id())
            .build());
    }
}
resources:
  network-policy-nw:
    type: gcp:vmwareengine:Network
    properties:
      name: sample-network
      location: global
      type: STANDARD
      description: VMwareEngine standard network sample
  vmw-engine-network-policy:
    type: gcp:vmwareengine:NetworkPolicy
    properties:
      location: us-west1
      name: sample-network-policy
      edgeServicesCidr: 192.168.30.0/26
      vmwareEngineNetwork: ${["network-policy-nw"].id}
Vmware Engine Network Policy Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const network_policy_nw = new gcp.vmwareengine.Network("network-policy-nw", {
    name: "sample-network",
    location: "global",
    type: "STANDARD",
    description: "VMwareEngine standard network sample",
});
const vmw_engine_network_policy = new gcp.vmwareengine.NetworkPolicy("vmw-engine-network-policy", {
    location: "us-west1",
    name: "sample-network-policy",
    edgeServicesCidr: "192.168.30.0/26",
    vmwareEngineNetwork: network_policy_nw.id,
    description: "Sample Network Policy",
    internetAccess: {
        enabled: true,
    },
    externalIp: {
        enabled: true,
    },
});
import pulumi
import pulumi_gcp as gcp
network_policy_nw = gcp.vmwareengine.Network("network-policy-nw",
    name="sample-network",
    location="global",
    type="STANDARD",
    description="VMwareEngine standard network sample")
vmw_engine_network_policy = gcp.vmwareengine.NetworkPolicy("vmw-engine-network-policy",
    location="us-west1",
    name="sample-network-policy",
    edge_services_cidr="192.168.30.0/26",
    vmware_engine_network=network_policy_nw.id,
    description="Sample Network Policy",
    internet_access={
        "enabled": True,
    },
    external_ip={
        "enabled": True,
    })
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vmwareengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		network_policy_nw, err := vmwareengine.NewNetwork(ctx, "network-policy-nw", &vmwareengine.NetworkArgs{
			Name:        pulumi.String("sample-network"),
			Location:    pulumi.String("global"),
			Type:        pulumi.String("STANDARD"),
			Description: pulumi.String("VMwareEngine standard network sample"),
		})
		if err != nil {
			return err
		}
		_, err = vmwareengine.NewNetworkPolicy(ctx, "vmw-engine-network-policy", &vmwareengine.NetworkPolicyArgs{
			Location:            pulumi.String("us-west1"),
			Name:                pulumi.String("sample-network-policy"),
			EdgeServicesCidr:    pulumi.String("192.168.30.0/26"),
			VmwareEngineNetwork: network_policy_nw.ID(),
			Description:         pulumi.String("Sample Network Policy"),
			InternetAccess: &vmwareengine.NetworkPolicyInternetAccessArgs{
				Enabled: pulumi.Bool(true),
			},
			ExternalIp: &vmwareengine.NetworkPolicyExternalIpArgs{
				Enabled: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var network_policy_nw = new Gcp.VMwareEngine.Network("network-policy-nw", new()
    {
        Name = "sample-network",
        Location = "global",
        Type = "STANDARD",
        Description = "VMwareEngine standard network sample",
    });
    var vmw_engine_network_policy = new Gcp.VMwareEngine.NetworkPolicy("vmw-engine-network-policy", new()
    {
        Location = "us-west1",
        Name = "sample-network-policy",
        EdgeServicesCidr = "192.168.30.0/26",
        VmwareEngineNetwork = network_policy_nw.Id,
        Description = "Sample Network Policy",
        InternetAccess = new Gcp.VMwareEngine.Inputs.NetworkPolicyInternetAccessArgs
        {
            Enabled = true,
        },
        ExternalIp = new Gcp.VMwareEngine.Inputs.NetworkPolicyExternalIpArgs
        {
            Enabled = true,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vmwareengine.Network;
import com.pulumi.gcp.vmwareengine.NetworkArgs;
import com.pulumi.gcp.vmwareengine.NetworkPolicy;
import com.pulumi.gcp.vmwareengine.NetworkPolicyArgs;
import com.pulumi.gcp.vmwareengine.inputs.NetworkPolicyInternetAccessArgs;
import com.pulumi.gcp.vmwareengine.inputs.NetworkPolicyExternalIpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var network_policy_nw = new Network("network-policy-nw", NetworkArgs.builder()
            .name("sample-network")
            .location("global")
            .type("STANDARD")
            .description("VMwareEngine standard network sample")
            .build());
        var vmw_engine_network_policy = new NetworkPolicy("vmw-engine-network-policy", NetworkPolicyArgs.builder()
            .location("us-west1")
            .name("sample-network-policy")
            .edgeServicesCidr("192.168.30.0/26")
            .vmwareEngineNetwork(network_policy_nw.id())
            .description("Sample Network Policy")
            .internetAccess(NetworkPolicyInternetAccessArgs.builder()
                .enabled(true)
                .build())
            .externalIp(NetworkPolicyExternalIpArgs.builder()
                .enabled(true)
                .build())
            .build());
    }
}
resources:
  network-policy-nw:
    type: gcp:vmwareengine:Network
    properties:
      name: sample-network
      location: global
      type: STANDARD
      description: VMwareEngine standard network sample
  vmw-engine-network-policy:
    type: gcp:vmwareengine:NetworkPolicy
    properties:
      location: us-west1
      name: sample-network-policy
      edgeServicesCidr: 192.168.30.0/26
      vmwareEngineNetwork: ${["network-policy-nw"].id}
      description: Sample Network Policy
      internetAccess:
        enabled: true
      externalIp:
        enabled: true
Create NetworkPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkPolicy(name: string, args: NetworkPolicyArgs, opts?: CustomResourceOptions);@overload
def NetworkPolicy(resource_name: str,
                  args: NetworkPolicyArgs,
                  opts: Optional[ResourceOptions] = None)
@overload
def NetworkPolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  edge_services_cidr: Optional[str] = None,
                  location: Optional[str] = None,
                  vmware_engine_network: Optional[str] = None,
                  description: Optional[str] = None,
                  external_ip: Optional[NetworkPolicyExternalIpArgs] = None,
                  internet_access: Optional[NetworkPolicyInternetAccessArgs] = None,
                  name: Optional[str] = None,
                  project: Optional[str] = None)func NewNetworkPolicy(ctx *Context, name string, args NetworkPolicyArgs, opts ...ResourceOption) (*NetworkPolicy, error)public NetworkPolicy(string name, NetworkPolicyArgs args, CustomResourceOptions? opts = null)
public NetworkPolicy(String name, NetworkPolicyArgs args)
public NetworkPolicy(String name, NetworkPolicyArgs args, CustomResourceOptions options)
type: gcp:vmwareengine:NetworkPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var networkPolicyResource = new Gcp.VMwareEngine.NetworkPolicy("networkPolicyResource", new()
{
    EdgeServicesCidr = "string",
    Location = "string",
    VmwareEngineNetwork = "string",
    Description = "string",
    ExternalIp = new Gcp.VMwareEngine.Inputs.NetworkPolicyExternalIpArgs
    {
        Enabled = false,
        State = "string",
    },
    InternetAccess = new Gcp.VMwareEngine.Inputs.NetworkPolicyInternetAccessArgs
    {
        Enabled = false,
        State = "string",
    },
    Name = "string",
    Project = "string",
});
example, err := vmwareengine.NewNetworkPolicy(ctx, "networkPolicyResource", &vmwareengine.NetworkPolicyArgs{
	EdgeServicesCidr:    pulumi.String("string"),
	Location:            pulumi.String("string"),
	VmwareEngineNetwork: pulumi.String("string"),
	Description:         pulumi.String("string"),
	ExternalIp: &vmwareengine.NetworkPolicyExternalIpArgs{
		Enabled: pulumi.Bool(false),
		State:   pulumi.String("string"),
	},
	InternetAccess: &vmwareengine.NetworkPolicyInternetAccessArgs{
		Enabled: pulumi.Bool(false),
		State:   pulumi.String("string"),
	},
	Name:    pulumi.String("string"),
	Project: pulumi.String("string"),
})
var networkPolicyResource = new NetworkPolicy("networkPolicyResource", NetworkPolicyArgs.builder()
    .edgeServicesCidr("string")
    .location("string")
    .vmwareEngineNetwork("string")
    .description("string")
    .externalIp(NetworkPolicyExternalIpArgs.builder()
        .enabled(false)
        .state("string")
        .build())
    .internetAccess(NetworkPolicyInternetAccessArgs.builder()
        .enabled(false)
        .state("string")
        .build())
    .name("string")
    .project("string")
    .build());
network_policy_resource = gcp.vmwareengine.NetworkPolicy("networkPolicyResource",
    edge_services_cidr="string",
    location="string",
    vmware_engine_network="string",
    description="string",
    external_ip={
        "enabled": False,
        "state": "string",
    },
    internet_access={
        "enabled": False,
        "state": "string",
    },
    name="string",
    project="string")
const networkPolicyResource = new gcp.vmwareengine.NetworkPolicy("networkPolicyResource", {
    edgeServicesCidr: "string",
    location: "string",
    vmwareEngineNetwork: "string",
    description: "string",
    externalIp: {
        enabled: false,
        state: "string",
    },
    internetAccess: {
        enabled: false,
        state: "string",
    },
    name: "string",
    project: "string",
});
type: gcp:vmwareengine:NetworkPolicy
properties:
    description: string
    edgeServicesCidr: string
    externalIp:
        enabled: false
        state: string
    internetAccess:
        enabled: false
        state: string
    location: string
    name: string
    project: string
    vmwareEngineNetwork: string
NetworkPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NetworkPolicy resource accepts the following input properties:
- EdgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- Location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- VmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- Description string
- User-provided description for this network policy.
- ExternalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- InternetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- Name string
- The ID of the Network Policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- EdgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- Location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- VmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- Description string
- User-provided description for this network policy.
- ExternalIp NetworkPolicy External Ip Args 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- InternetAccess NetworkPolicy Internet Access Args 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- Name string
- The ID of the Network Policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- edgeServices StringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- location String
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- vmwareEngine StringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- description String
- User-provided description for this network policy.
- externalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- name String
- The ID of the Network Policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- edgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- vmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- description string
- User-provided description for this network policy.
- externalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- name string
- The ID of the Network Policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- edge_services_ strcidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- location str
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- vmware_engine_ strnetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- description str
- User-provided description for this network policy.
- external_ip NetworkPolicy External Ip Args 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internet_access NetworkPolicy Internet Access Args 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- name str
- The ID of the Network Policy.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- edgeServices StringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- location String
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- vmwareEngine StringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- description String
- User-provided description for this network policy.
- externalIp Property Map
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess Property Map
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- name String
- The ID of the Network Policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPolicy resource produces the following output properties:
- CreateTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Id string
- The provider-assigned unique ID for this managed resource.
- Uid string
- System-generated unique identifier for the resource.
- UpdateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- VmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- CreateTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Id string
- The provider-assigned unique ID for this managed resource.
- Uid string
- System-generated unique identifier for the resource.
- UpdateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- VmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime String
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- id String
- The provider-assigned unique ID for this managed resource.
- uid String
- System-generated unique identifier for the resource.
- updateTime String
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine StringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- id string
- The provider-assigned unique ID for this managed resource.
- uid string
- System-generated unique identifier for the resource.
- updateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- create_time str
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- id str
- The provider-assigned unique ID for this managed resource.
- uid str
- System-generated unique identifier for the resource.
- update_time str
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmware_engine_ strnetwork_ canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime String
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- id String
- The provider-assigned unique ID for this managed resource.
- uid String
- System-generated unique identifier for the resource.
- updateTime String
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine StringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
Look up Existing NetworkPolicy Resource
Get an existing NetworkPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NetworkPolicyState, opts?: CustomResourceOptions): NetworkPolicy@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        edge_services_cidr: Optional[str] = None,
        external_ip: Optional[NetworkPolicyExternalIpArgs] = None,
        internet_access: Optional[NetworkPolicyInternetAccessArgs] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        uid: Optional[str] = None,
        update_time: Optional[str] = None,
        vmware_engine_network: Optional[str] = None,
        vmware_engine_network_canonical: Optional[str] = None) -> NetworkPolicyfunc GetNetworkPolicy(ctx *Context, name string, id IDInput, state *NetworkPolicyState, opts ...ResourceOption) (*NetworkPolicy, error)public static NetworkPolicy Get(string name, Input<string> id, NetworkPolicyState? state, CustomResourceOptions? opts = null)public static NetworkPolicy get(String name, Output<String> id, NetworkPolicyState state, CustomResourceOptions options)resources:  _:    type: gcp:vmwareengine:NetworkPolicy    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- CreateTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Description string
- User-provided description for this network policy.
- EdgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- ExternalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- InternetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- Location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- Name string
- The ID of the Network Policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Uid string
- System-generated unique identifier for the resource.
- UpdateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- VmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- VmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- CreateTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Description string
- User-provided description for this network policy.
- EdgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- ExternalIp NetworkPolicy External Ip Args 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- InternetAccess NetworkPolicy Internet Access Args 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- Location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- Name string
- The ID of the Network Policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Uid string
- System-generated unique identifier for the resource.
- UpdateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- VmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- VmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime String
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- description String
- User-provided description for this network policy.
- edgeServices StringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- externalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- location String
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- name String
- The ID of the Network Policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- uid String
- System-generated unique identifier for the resource.
- updateTime String
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine StringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- vmwareEngine StringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime string
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- description string
- User-provided description for this network policy.
- edgeServices stringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- externalIp NetworkPolicy External Ip 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess NetworkPolicy Internet Access 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- location string
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- name string
- The ID of the Network Policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- uid string
- System-generated unique identifier for the resource.
- updateTime string
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine stringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- vmwareEngine stringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- create_time str
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- description str
- User-provided description for this network policy.
- edge_services_ strcidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- external_ip NetworkPolicy External Ip Args 
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internet_access NetworkPolicy Internet Access Args 
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- location str
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- name str
- The ID of the Network Policy.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- uid str
- System-generated unique identifier for the resource.
- update_time str
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmware_engine_ strnetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- vmware_engine_ strnetwork_ canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
- createTime String
- Creation time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- description String
- User-provided description for this network policy.
- edgeServices StringCidr 
- IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- externalIp Property Map
- Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled. Structure is documented below.
- internetAccess Property Map
- Network service that allows VMware workloads to access the internet. Structure is documented below.
- location String
- The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1
- name String
- The ID of the Network Policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- uid String
- System-generated unique identifier for the resource.
- updateTime String
- Last updated time of this resource. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- vmwareEngine StringNetwork 
- The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.
- vmwareEngine StringNetwork Canonical 
- The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}
Supporting Types
NetworkPolicyExternalIp, NetworkPolicyExternalIpArgs        
NetworkPolicyInternetAccess, NetworkPolicyInternetAccessArgs        
Import
NetworkPolicy can be imported using any of these accepted formats:
- projects/{{project}}/locations/{{location}}/networkPolicies/{{name}}
- {{project}}/{{location}}/{{name}}
- {{location}}/{{name}}
When using the pulumi import command, NetworkPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:vmwareengine/networkPolicy:NetworkPolicy default projects/{{project}}/locations/{{location}}/networkPolicies/{{name}}
$ pulumi import gcp:vmwareengine/networkPolicy:NetworkPolicy default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:vmwareengine/networkPolicy:NetworkPolicy default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.
