1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. networkconnectivity
  5. PolicyBasedRoute
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.networkconnectivity.PolicyBasedRoute

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Policy-based Routes are more powerful routes that route L4 network traffic based on not just destination IP, but also source IP, protocol and more. A Policy-based Route always take precedence when it conflicts with other types of routes.

    To get more information about PolicyBasedRoute, see:

    Example Usage

    Network Connectivity Policy Based Route Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myNetwork = new gcp.compute.Network("my_network", {
        name: "my-network",
        autoCreateSubnetworks: false,
    });
    const _default = new gcp.networkconnectivity.PolicyBasedRoute("default", {
        name: "my-pbr",
        network: myNetwork.id,
        filter: {
            protocolVersion: "IPV4",
        },
        nextHopOtherRoutes: "DEFAULT_ROUTING",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_network = gcp.compute.Network("my_network",
        name="my-network",
        auto_create_subnetworks=False)
    default = gcp.networkconnectivity.PolicyBasedRoute("default",
        name="my-pbr",
        network=my_network.id,
        filter=gcp.networkconnectivity.PolicyBasedRouteFilterArgs(
            protocol_version="IPV4",
        ),
        next_hop_other_routes="DEFAULT_ROUTING")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myNetwork, err := compute.NewNetwork(ctx, "my_network", &compute.NetworkArgs{
    			Name:                  pulumi.String("my-network"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkconnectivity.NewPolicyBasedRoute(ctx, "default", &networkconnectivity.PolicyBasedRouteArgs{
    			Name:    pulumi.String("my-pbr"),
    			Network: myNetwork.ID(),
    			Filter: &networkconnectivity.PolicyBasedRouteFilterArgs{
    				ProtocolVersion: pulumi.String("IPV4"),
    			},
    			NextHopOtherRoutes: pulumi.String("DEFAULT_ROUTING"),
    		})
    		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 myNetwork = new Gcp.Compute.Network("my_network", new()
        {
            Name = "my-network",
            AutoCreateSubnetworks = false,
        });
    
        var @default = new Gcp.NetworkConnectivity.PolicyBasedRoute("default", new()
        {
            Name = "my-pbr",
            Network = myNetwork.Id,
            Filter = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteFilterArgs
            {
                ProtocolVersion = "IPV4",
            },
            NextHopOtherRoutes = "DEFAULT_ROUTING",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.networkconnectivity.PolicyBasedRoute;
    import com.pulumi.gcp.networkconnectivity.PolicyBasedRouteArgs;
    import com.pulumi.gcp.networkconnectivity.inputs.PolicyBasedRouteFilterArgs;
    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 myNetwork = new Network("myNetwork", NetworkArgs.builder()        
                .name("my-network")
                .autoCreateSubnetworks(false)
                .build());
    
            var default_ = new PolicyBasedRoute("default", PolicyBasedRouteArgs.builder()        
                .name("my-pbr")
                .network(myNetwork.id())
                .filter(PolicyBasedRouteFilterArgs.builder()
                    .protocolVersion("IPV4")
                    .build())
                .nextHopOtherRoutes("DEFAULT_ROUTING")
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:networkconnectivity:PolicyBasedRoute
        properties:
          name: my-pbr
          network: ${myNetwork.id}
          filter:
            protocolVersion: IPV4
          nextHopOtherRoutes: DEFAULT_ROUTING
      myNetwork:
        type: gcp:compute:Network
        name: my_network
        properties:
          name: my-network
          autoCreateSubnetworks: false
    

    Network Connectivity Policy Based Route Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myNetwork = new gcp.compute.Network("my_network", {
        name: "my-network",
        autoCreateSubnetworks: false,
    });
    // This example substitutes an arbitrary internal IP for an internal network
    // load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
    // to set one up.
    const ilb = new gcp.compute.GlobalAddress("ilb", {name: "my-ilb"});
    const _default = new gcp.networkconnectivity.PolicyBasedRoute("default", {
        name: "my-pbr",
        description: "My routing policy",
        network: myNetwork.id,
        priority: 2302,
        filter: {
            protocolVersion: "IPV4",
            ipProtocol: "UDP",
            srcRange: "10.0.0.0/24",
            destRange: "0.0.0.0/0",
        },
        nextHopIlbIp: ilb.address,
        virtualMachine: {
            tags: ["restricted"],
        },
        labels: {
            env: "default",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_network = gcp.compute.Network("my_network",
        name="my-network",
        auto_create_subnetworks=False)
    # This example substitutes an arbitrary internal IP for an internal network
    # load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
    # to set one up.
    ilb = gcp.compute.GlobalAddress("ilb", name="my-ilb")
    default = gcp.networkconnectivity.PolicyBasedRoute("default",
        name="my-pbr",
        description="My routing policy",
        network=my_network.id,
        priority=2302,
        filter=gcp.networkconnectivity.PolicyBasedRouteFilterArgs(
            protocol_version="IPV4",
            ip_protocol="UDP",
            src_range="10.0.0.0/24",
            dest_range="0.0.0.0/0",
        ),
        next_hop_ilb_ip=ilb.address,
        virtual_machine=gcp.networkconnectivity.PolicyBasedRouteVirtualMachineArgs(
            tags=["restricted"],
        ),
        labels={
            "env": "default",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myNetwork, err := compute.NewNetwork(ctx, "my_network", &compute.NetworkArgs{
    			Name:                  pulumi.String("my-network"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		// This example substitutes an arbitrary internal IP for an internal network
    		// load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
    		// to set one up.
    		ilb, err := compute.NewGlobalAddress(ctx, "ilb", &compute.GlobalAddressArgs{
    			Name: pulumi.String("my-ilb"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networkconnectivity.NewPolicyBasedRoute(ctx, "default", &networkconnectivity.PolicyBasedRouteArgs{
    			Name:        pulumi.String("my-pbr"),
    			Description: pulumi.String("My routing policy"),
    			Network:     myNetwork.ID(),
    			Priority:    pulumi.Int(2302),
    			Filter: &networkconnectivity.PolicyBasedRouteFilterArgs{
    				ProtocolVersion: pulumi.String("IPV4"),
    				IpProtocol:      pulumi.String("UDP"),
    				SrcRange:        pulumi.String("10.0.0.0/24"),
    				DestRange:       pulumi.String("0.0.0.0/0"),
    			},
    			NextHopIlbIp: ilb.Address,
    			VirtualMachine: &networkconnectivity.PolicyBasedRouteVirtualMachineArgs{
    				Tags: pulumi.StringArray{
    					pulumi.String("restricted"),
    				},
    			},
    			Labels: pulumi.StringMap{
    				"env": pulumi.String("default"),
    			},
    		})
    		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 myNetwork = new Gcp.Compute.Network("my_network", new()
        {
            Name = "my-network",
            AutoCreateSubnetworks = false,
        });
    
        // This example substitutes an arbitrary internal IP for an internal network
        // load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
        // to set one up.
        var ilb = new Gcp.Compute.GlobalAddress("ilb", new()
        {
            Name = "my-ilb",
        });
    
        var @default = new Gcp.NetworkConnectivity.PolicyBasedRoute("default", new()
        {
            Name = "my-pbr",
            Description = "My routing policy",
            Network = myNetwork.Id,
            Priority = 2302,
            Filter = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteFilterArgs
            {
                ProtocolVersion = "IPV4",
                IpProtocol = "UDP",
                SrcRange = "10.0.0.0/24",
                DestRange = "0.0.0.0/0",
            },
            NextHopIlbIp = ilb.Address,
            VirtualMachine = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteVirtualMachineArgs
            {
                Tags = new[]
                {
                    "restricted",
                },
            },
            Labels = 
            {
                { "env", "default" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.GlobalAddress;
    import com.pulumi.gcp.compute.GlobalAddressArgs;
    import com.pulumi.gcp.networkconnectivity.PolicyBasedRoute;
    import com.pulumi.gcp.networkconnectivity.PolicyBasedRouteArgs;
    import com.pulumi.gcp.networkconnectivity.inputs.PolicyBasedRouteFilterArgs;
    import com.pulumi.gcp.networkconnectivity.inputs.PolicyBasedRouteVirtualMachineArgs;
    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 myNetwork = new Network("myNetwork", NetworkArgs.builder()        
                .name("my-network")
                .autoCreateSubnetworks(false)
                .build());
    
            // This example substitutes an arbitrary internal IP for an internal network
            // load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
            // to set one up.
            var ilb = new GlobalAddress("ilb", GlobalAddressArgs.builder()        
                .name("my-ilb")
                .build());
    
            var default_ = new PolicyBasedRoute("default", PolicyBasedRouteArgs.builder()        
                .name("my-pbr")
                .description("My routing policy")
                .network(myNetwork.id())
                .priority(2302)
                .filter(PolicyBasedRouteFilterArgs.builder()
                    .protocolVersion("IPV4")
                    .ipProtocol("UDP")
                    .srcRange("10.0.0.0/24")
                    .destRange("0.0.0.0/0")
                    .build())
                .nextHopIlbIp(ilb.address())
                .virtualMachine(PolicyBasedRouteVirtualMachineArgs.builder()
                    .tags("restricted")
                    .build())
                .labels(Map.of("env", "default"))
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:networkconnectivity:PolicyBasedRoute
        properties:
          name: my-pbr
          description: My routing policy
          network: ${myNetwork.id}
          priority: 2302
          filter:
            protocolVersion: IPV4
            ipProtocol: UDP
            srcRange: 10.0.0.0/24
            destRange: 0.0.0.0/0
          nextHopIlbIp: ${ilb.address}
          virtualMachine:
            tags:
              - restricted
          labels:
            env: default
      myNetwork:
        type: gcp:compute:Network
        name: my_network
        properties:
          name: my-network
          autoCreateSubnetworks: false
      # This example substitutes an arbitrary internal IP for an internal network
      # load balancer for brevity. Consult https://cloud.google.com/load-balancing/docs/internal
      # to set one up.
      ilb:
        type: gcp:compute:GlobalAddress
        properties:
          name: my-ilb
    

    Create PolicyBasedRoute Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PolicyBasedRoute(name: string, args: PolicyBasedRouteArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyBasedRoute(resource_name: str,
                         args: PolicyBasedRouteArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyBasedRoute(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         filter: Optional[PolicyBasedRouteFilterArgs] = None,
                         network: Optional[str] = None,
                         description: Optional[str] = None,
                         interconnect_attachment: Optional[PolicyBasedRouteInterconnectAttachmentArgs] = None,
                         labels: Optional[Mapping[str, str]] = None,
                         name: Optional[str] = None,
                         next_hop_ilb_ip: Optional[str] = None,
                         next_hop_other_routes: Optional[str] = None,
                         priority: Optional[int] = None,
                         project: Optional[str] = None,
                         virtual_machine: Optional[PolicyBasedRouteVirtualMachineArgs] = None)
    func NewPolicyBasedRoute(ctx *Context, name string, args PolicyBasedRouteArgs, opts ...ResourceOption) (*PolicyBasedRoute, error)
    public PolicyBasedRoute(string name, PolicyBasedRouteArgs args, CustomResourceOptions? opts = null)
    public PolicyBasedRoute(String name, PolicyBasedRouteArgs args)
    public PolicyBasedRoute(String name, PolicyBasedRouteArgs args, CustomResourceOptions options)
    
    type: gcp:networkconnectivity:PolicyBasedRoute
    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 PolicyBasedRouteArgs
    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 PolicyBasedRouteArgs
    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 PolicyBasedRouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyBasedRouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyBasedRouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var policyBasedRouteResource = new Gcp.NetworkConnectivity.PolicyBasedRoute("policyBasedRouteResource", new()
    {
        Filter = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteFilterArgs
        {
            ProtocolVersion = "string",
            DestRange = "string",
            IpProtocol = "string",
            SrcRange = "string",
        },
        Network = "string",
        Description = "string",
        InterconnectAttachment = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteInterconnectAttachmentArgs
        {
            Region = "string",
        },
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        NextHopIlbIp = "string",
        NextHopOtherRoutes = "string",
        Priority = 0,
        Project = "string",
        VirtualMachine = new Gcp.NetworkConnectivity.Inputs.PolicyBasedRouteVirtualMachineArgs
        {
            Tags = new[]
            {
                "string",
            },
        },
    });
    
    example, err := networkconnectivity.NewPolicyBasedRoute(ctx, "policyBasedRouteResource", &networkconnectivity.PolicyBasedRouteArgs{
    	Filter: &networkconnectivity.PolicyBasedRouteFilterArgs{
    		ProtocolVersion: pulumi.String("string"),
    		DestRange:       pulumi.String("string"),
    		IpProtocol:      pulumi.String("string"),
    		SrcRange:        pulumi.String("string"),
    	},
    	Network:     pulumi.String("string"),
    	Description: pulumi.String("string"),
    	InterconnectAttachment: &networkconnectivity.PolicyBasedRouteInterconnectAttachmentArgs{
    		Region: pulumi.String("string"),
    	},
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:               pulumi.String("string"),
    	NextHopIlbIp:       pulumi.String("string"),
    	NextHopOtherRoutes: pulumi.String("string"),
    	Priority:           pulumi.Int(0),
    	Project:            pulumi.String("string"),
    	VirtualMachine: &networkconnectivity.PolicyBasedRouteVirtualMachineArgs{
    		Tags: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var policyBasedRouteResource = new PolicyBasedRoute("policyBasedRouteResource", PolicyBasedRouteArgs.builder()        
        .filter(PolicyBasedRouteFilterArgs.builder()
            .protocolVersion("string")
            .destRange("string")
            .ipProtocol("string")
            .srcRange("string")
            .build())
        .network("string")
        .description("string")
        .interconnectAttachment(PolicyBasedRouteInterconnectAttachmentArgs.builder()
            .region("string")
            .build())
        .labels(Map.of("string", "string"))
        .name("string")
        .nextHopIlbIp("string")
        .nextHopOtherRoutes("string")
        .priority(0)
        .project("string")
        .virtualMachine(PolicyBasedRouteVirtualMachineArgs.builder()
            .tags("string")
            .build())
        .build());
    
    policy_based_route_resource = gcp.networkconnectivity.PolicyBasedRoute("policyBasedRouteResource",
        filter=gcp.networkconnectivity.PolicyBasedRouteFilterArgs(
            protocol_version="string",
            dest_range="string",
            ip_protocol="string",
            src_range="string",
        ),
        network="string",
        description="string",
        interconnect_attachment=gcp.networkconnectivity.PolicyBasedRouteInterconnectAttachmentArgs(
            region="string",
        ),
        labels={
            "string": "string",
        },
        name="string",
        next_hop_ilb_ip="string",
        next_hop_other_routes="string",
        priority=0,
        project="string",
        virtual_machine=gcp.networkconnectivity.PolicyBasedRouteVirtualMachineArgs(
            tags=["string"],
        ))
    
    const policyBasedRouteResource = new gcp.networkconnectivity.PolicyBasedRoute("policyBasedRouteResource", {
        filter: {
            protocolVersion: "string",
            destRange: "string",
            ipProtocol: "string",
            srcRange: "string",
        },
        network: "string",
        description: "string",
        interconnectAttachment: {
            region: "string",
        },
        labels: {
            string: "string",
        },
        name: "string",
        nextHopIlbIp: "string",
        nextHopOtherRoutes: "string",
        priority: 0,
        project: "string",
        virtualMachine: {
            tags: ["string"],
        },
    });
    
    type: gcp:networkconnectivity:PolicyBasedRoute
    properties:
        description: string
        filter:
            destRange: string
            ipProtocol: string
            protocolVersion: string
            srcRange: string
        interconnectAttachment:
            region: string
        labels:
            string: string
        name: string
        network: string
        nextHopIlbIp: string
        nextHopOtherRoutes: string
        priority: 0
        project: string
        virtualMachine:
            tags:
                - string
    

    PolicyBasedRoute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PolicyBasedRoute resource accepts the following input properties:

    Filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    Network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    Description string
    An optional description of this resource.
    InterconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    Labels Dictionary<string, string>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The name of the policy based route.
    NextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    NextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    Priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    Project string
    VirtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    Filter PolicyBasedRouteFilterArgs
    The filter to match L4 traffic. Structure is documented below.
    Network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    Description string
    An optional description of this resource.
    InterconnectAttachment PolicyBasedRouteInterconnectAttachmentArgs
    The interconnect attachments that this policy-based route applies to.
    Labels map[string]string
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The name of the policy based route.
    NextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    NextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    Priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    Project string
    VirtualMachine PolicyBasedRouteVirtualMachineArgs
    VM instances to which this policy-based route applies to.
    filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    network String
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    description String
    An optional description of this resource.
    interconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    labels Map<String,String>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The name of the policy based route.
    nextHopIlbIp String
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes String
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority Integer
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project String
    virtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    description string
    An optional description of this resource.
    interconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    labels {[key: string]: string}
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name string
    The name of the policy based route.
    nextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority number
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project string
    virtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    filter PolicyBasedRouteFilterArgs
    The filter to match L4 traffic. Structure is documented below.
    network str
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    description str
    An optional description of this resource.
    interconnect_attachment PolicyBasedRouteInterconnectAttachmentArgs
    The interconnect attachments that this policy-based route applies to.
    labels Mapping[str, str]
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name str
    The name of the policy based route.
    next_hop_ilb_ip str
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    next_hop_other_routes str
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project str
    virtual_machine PolicyBasedRouteVirtualMachineArgs
    VM instances to which this policy-based route applies to.
    filter Property Map
    The filter to match L4 traffic. Structure is documented below.
    network String
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    description String
    An optional description of this resource.
    interconnectAttachment Property Map
    The interconnect attachments that this policy-based route applies to.
    labels Map<String>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The name of the policy based route.
    nextHopIlbIp String
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes String
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority Number
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project String
    virtualMachine Property Map
    VM instances to which this policy-based route applies to.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyBasedRoute resource produces the following output properties:

    CreateTime string
    Time when the policy-based route was created.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Type of this resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    Time when the policy-based route was created.
    Warnings List<PolicyBasedRouteWarning>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    CreateTime string
    Time when the policy-based route was created.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Type of this resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    Time when the policy-based route was created.
    Warnings []PolicyBasedRouteWarning
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime String
    Time when the policy-based route was created.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Type of this resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    Time when the policy-based route was created.
    warnings List<PolicyBasedRouteWarning>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime string
    Time when the policy-based route was created.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    Type of this resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime string
    Time when the policy-based route was created.
    warnings PolicyBasedRouteWarning[]
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    create_time str
    Time when the policy-based route was created.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    Type of this resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    update_time str
    Time when the policy-based route was created.
    warnings Sequence[PolicyBasedRouteWarning]
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime String
    Time when the policy-based route was created.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Type of this resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    Time when the policy-based route was created.
    warnings List<Property Map>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.

    Look up Existing PolicyBasedRoute Resource

    Get an existing PolicyBasedRoute 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?: PolicyBasedRouteState, opts?: CustomResourceOptions): PolicyBasedRoute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            filter: Optional[PolicyBasedRouteFilterArgs] = None,
            interconnect_attachment: Optional[PolicyBasedRouteInterconnectAttachmentArgs] = None,
            kind: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            network: Optional[str] = None,
            next_hop_ilb_ip: Optional[str] = None,
            next_hop_other_routes: Optional[str] = None,
            priority: Optional[int] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            update_time: Optional[str] = None,
            virtual_machine: Optional[PolicyBasedRouteVirtualMachineArgs] = None,
            warnings: Optional[Sequence[PolicyBasedRouteWarningArgs]] = None) -> PolicyBasedRoute
    func GetPolicyBasedRoute(ctx *Context, name string, id IDInput, state *PolicyBasedRouteState, opts ...ResourceOption) (*PolicyBasedRoute, error)
    public static PolicyBasedRoute Get(string name, Input<string> id, PolicyBasedRouteState? state, CustomResourceOptions? opts = null)
    public static PolicyBasedRoute get(String name, Output<String> id, PolicyBasedRouteState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    CreateTime string
    Time when the policy-based route was created.
    Description string
    An optional description of this resource.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    InterconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    Kind string
    Type of this resource.
    Labels Dictionary<string, string>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The name of the policy based route.
    Network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    NextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    NextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    Priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    Project string
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    Time when the policy-based route was created.
    VirtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    Warnings List<PolicyBasedRouteWarning>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    CreateTime string
    Time when the policy-based route was created.
    Description string
    An optional description of this resource.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Filter PolicyBasedRouteFilterArgs
    The filter to match L4 traffic. Structure is documented below.
    InterconnectAttachment PolicyBasedRouteInterconnectAttachmentArgs
    The interconnect attachments that this policy-based route applies to.
    Kind string
    Type of this resource.
    Labels map[string]string
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The name of the policy based route.
    Network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    NextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    NextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    Priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    Project string
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    Time when the policy-based route was created.
    VirtualMachine PolicyBasedRouteVirtualMachineArgs
    VM instances to which this policy-based route applies to.
    Warnings []PolicyBasedRouteWarningArgs
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime String
    Time when the policy-based route was created.
    description String
    An optional description of this resource.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    interconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    kind String
    Type of this resource.
    labels Map<String,String>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The name of the policy based route.
    network String
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    nextHopIlbIp String
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes String
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority Integer
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project String
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    Time when the policy-based route was created.
    virtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    warnings List<PolicyBasedRouteWarning>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime string
    Time when the policy-based route was created.
    description string
    An optional description of this resource.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filter PolicyBasedRouteFilter
    The filter to match L4 traffic. Structure is documented below.
    interconnectAttachment PolicyBasedRouteInterconnectAttachment
    The interconnect attachments that this policy-based route applies to.
    kind string
    Type of this resource.
    labels {[key: string]: string}
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name string
    The name of the policy based route.
    network string
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    nextHopIlbIp string
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes string
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority number
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project string
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime string
    Time when the policy-based route was created.
    virtualMachine PolicyBasedRouteVirtualMachine
    VM instances to which this policy-based route applies to.
    warnings PolicyBasedRouteWarning[]
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    create_time str
    Time when the policy-based route was created.
    description str
    An optional description of this resource.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filter PolicyBasedRouteFilterArgs
    The filter to match L4 traffic. Structure is documented below.
    interconnect_attachment PolicyBasedRouteInterconnectAttachmentArgs
    The interconnect attachments that this policy-based route applies to.
    kind str
    Type of this resource.
    labels Mapping[str, str]
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name str
    The name of the policy based route.
    network str
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    next_hop_ilb_ip str
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    next_hop_other_routes str
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority int
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project str
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    update_time str
    Time when the policy-based route was created.
    virtual_machine PolicyBasedRouteVirtualMachineArgs
    VM instances to which this policy-based route applies to.
    warnings Sequence[PolicyBasedRouteWarningArgs]
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.
    createTime String
    Time when the policy-based route was created.
    description String
    An optional description of this resource.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filter Property Map
    The filter to match L4 traffic. Structure is documented below.
    interconnectAttachment Property Map
    The interconnect attachments that this policy-based route applies to.
    kind String
    Type of this resource.
    labels Map<String>
    User-defined labels. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The name of the policy based route.
    network String
    Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
    nextHopIlbIp String
    The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets.
    nextHopOtherRoutes String
    Other routes that will be referenced to determine the next hop of the packet. Possible values: ["DEFAULT_ROUTING"]
    priority Number
    The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.
    project String
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    Time when the policy-based route was created.
    virtualMachine Property Map
    VM instances to which this policy-based route applies to.
    warnings List<Property Map>
    If potential misconfigurations are detected for this route, this field will be populated with warning messages. Structure is documented below.

    Supporting Types

    PolicyBasedRouteFilter, PolicyBasedRouteFilterArgs

    ProtocolVersion string
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    DestRange string
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    IpProtocol string
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    SrcRange string
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
    ProtocolVersion string
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    DestRange string
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    IpProtocol string
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    SrcRange string
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
    protocolVersion String
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    destRange String
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    ipProtocol String
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    srcRange String
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
    protocolVersion string
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    destRange string
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    ipProtocol string
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    srcRange string
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
    protocol_version str
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    dest_range str
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    ip_protocol str
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    src_range str
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.
    protocolVersion String
    Internet protocol versions this policy-based route applies to. Possible values are: IPV4.
    destRange String
    The destination IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.


    ipProtocol String
    The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
    srcRange String
    The source IP range of outgoing packets that this policy-based route applies to. Default is "0.0.0.0/0" if protocol version is IPv4.

    PolicyBasedRouteInterconnectAttachment, PolicyBasedRouteInterconnectAttachmentArgs

    Region string
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.
    Region string
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.
    region String
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.
    region string
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.
    region str
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.
    region String
    Cloud region to install this policy-based route on for Interconnect attachments. Use all to install it on all Interconnect attachments.

    PolicyBasedRouteVirtualMachine, PolicyBasedRouteVirtualMachineArgs

    Tags List<string>
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.
    Tags []string
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.
    tags List<String>
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.
    tags string[]
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.
    tags Sequence[str]
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.
    tags List<String>
    A list of VM instance tags that this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.

    PolicyBasedRouteWarning, PolicyBasedRouteWarningArgs

    Code string
    (Output) A warning code, if applicable.
    Data Dictionary<string, string>
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    WarningMessage string
    (Output) A human-readable description of the warning code.
    Code string
    (Output) A warning code, if applicable.
    Data map[string]string
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    WarningMessage string
    (Output) A human-readable description of the warning code.
    code String
    (Output) A warning code, if applicable.
    data Map<String,String>
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    warningMessage String
    (Output) A human-readable description of the warning code.
    code string
    (Output) A warning code, if applicable.
    data {[key: string]: string}
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    warningMessage string
    (Output) A human-readable description of the warning code.
    code str
    (Output) A warning code, if applicable.
    data Mapping[str, str]
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    warning_message str
    (Output) A human-readable description of the warning code.
    code String
    (Output) A warning code, if applicable.
    data Map<String>
    (Output) Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.
    warningMessage String
    (Output) A human-readable description of the warning code.

    Import

    PolicyBasedRoute can be imported using any of these accepted formats:

    • projects/{{project}}/locations/global/policyBasedRoutes/{{name}}

    • {{project}}/{{name}}

    • {{name}}

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

    $ pulumi import gcp:networkconnectivity/policyBasedRoute:PolicyBasedRoute default projects/{{project}}/locations/global/policyBasedRoutes/{{name}}
    
    $ pulumi import gcp:networkconnectivity/policyBasedRoute:PolicyBasedRoute default {{project}}/{{name}}
    
    $ pulumi import gcp:networkconnectivity/policyBasedRoute:PolicyBasedRoute default {{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-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi