Google Cloud (GCP) Classic

v6.44.0 published on Tuesday, Nov 29, 2022 by Pulumi

Policy

A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.

To get more information about Policy, see:

Example Usage

Dns Policy Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var network_1 = new Gcp.Compute.Network("network-1", new()
    {
        AutoCreateSubnetworks = false,
    });

    var network_2 = new Gcp.Compute.Network("network-2", new()
    {
        AutoCreateSubnetworks = false,
    });

    var example_policy = new Gcp.Dns.Policy("example-policy", new()
    {
        EnableInboundForwarding = true,
        EnableLogging = true,
        AlternativeNameServerConfig = new Gcp.Dns.Inputs.PolicyAlternativeNameServerConfigArgs
        {
            TargetNameServers = new[]
            {
                new Gcp.Dns.Inputs.PolicyAlternativeNameServerConfigTargetNameServerArgs
                {
                    Ipv4Address = "172.16.1.10",
                    ForwardingPath = "private",
                },
                new Gcp.Dns.Inputs.PolicyAlternativeNameServerConfigTargetNameServerArgs
                {
                    Ipv4Address = "172.16.1.20",
                },
            },
        },
        Networks = new[]
        {
            new Gcp.Dns.Inputs.PolicyNetworkArgs
            {
                NetworkUrl = network_1.Id,
            },
            new Gcp.Dns.Inputs.PolicyNetworkArgs
            {
                NetworkUrl = network_2.Id,
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewNetwork(ctx, "network-1", &compute.NetworkArgs{
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewNetwork(ctx, "network-2", &compute.NetworkArgs{
			AutoCreateSubnetworks: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_, err = dns.NewPolicy(ctx, "example-policy", &dns.PolicyArgs{
			EnableInboundForwarding: pulumi.Bool(true),
			EnableLogging:           pulumi.Bool(true),
			AlternativeNameServerConfig: &dns.PolicyAlternativeNameServerConfigArgs{
				TargetNameServers: dns.PolicyAlternativeNameServerConfigTargetNameServerArray{
					&dns.PolicyAlternativeNameServerConfigTargetNameServerArgs{
						Ipv4Address:    pulumi.String("172.16.1.10"),
						ForwardingPath: pulumi.String("private"),
					},
					&dns.PolicyAlternativeNameServerConfigTargetNameServerArgs{
						Ipv4Address: pulumi.String("172.16.1.20"),
					},
				},
			},
			Networks: dns.PolicyNetworkArray{
				&dns.PolicyNetworkArgs{
					NetworkUrl: network_1.ID(),
				},
				&dns.PolicyNetworkArgs{
					NetworkUrl: network_2.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.dns.Policy;
import com.pulumi.gcp.dns.PolicyArgs;
import com.pulumi.gcp.dns.inputs.PolicyAlternativeNameServerConfigArgs;
import com.pulumi.gcp.dns.inputs.PolicyNetworkArgs;
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_1 = new Network("network-1", NetworkArgs.builder()        
            .autoCreateSubnetworks(false)
            .build());

        var network_2 = new Network("network-2", NetworkArgs.builder()        
            .autoCreateSubnetworks(false)
            .build());

        var example_policy = new Policy("example-policy", PolicyArgs.builder()        
            .enableInboundForwarding(true)
            .enableLogging(true)
            .alternativeNameServerConfig(PolicyAlternativeNameServerConfigArgs.builder()
                .targetNameServers(                
                    PolicyAlternativeNameServerConfigTargetNameServerArgs.builder()
                        .ipv4Address("172.16.1.10")
                        .forwardingPath("private")
                        .build(),
                    PolicyAlternativeNameServerConfigTargetNameServerArgs.builder()
                        .ipv4Address("172.16.1.20")
                        .build())
                .build())
            .networks(            
                PolicyNetworkArgs.builder()
                    .networkUrl(network_1.id())
                    .build(),
                PolicyNetworkArgs.builder()
                    .networkUrl(network_2.id())
                    .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

network_1 = gcp.compute.Network("network-1", auto_create_subnetworks=False)
network_2 = gcp.compute.Network("network-2", auto_create_subnetworks=False)
example_policy = gcp.dns.Policy("example-policy",
    enable_inbound_forwarding=True,
    enable_logging=True,
    alternative_name_server_config=gcp.dns.PolicyAlternativeNameServerConfigArgs(
        target_name_servers=[
            gcp.dns.PolicyAlternativeNameServerConfigTargetNameServerArgs(
                ipv4_address="172.16.1.10",
                forwarding_path="private",
            ),
            gcp.dns.PolicyAlternativeNameServerConfigTargetNameServerArgs(
                ipv4_address="172.16.1.20",
            ),
        ],
    ),
    networks=[
        gcp.dns.PolicyNetworkArgs(
            network_url=network_1.id,
        ),
        gcp.dns.PolicyNetworkArgs(
            network_url=network_2.id,
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const network_1 = new gcp.compute.Network("network-1", {autoCreateSubnetworks: false});
const network_2 = new gcp.compute.Network("network-2", {autoCreateSubnetworks: false});
const example_policy = new gcp.dns.Policy("example-policy", {
    enableInboundForwarding: true,
    enableLogging: true,
    alternativeNameServerConfig: {
        targetNameServers: [
            {
                ipv4Address: "172.16.1.10",
                forwardingPath: "private",
            },
            {
                ipv4Address: "172.16.1.20",
            },
        ],
    },
    networks: [
        {
            networkUrl: network_1.id,
        },
        {
            networkUrl: network_2.id,
        },
    ],
});
resources:
  example-policy:
    type: gcp:dns:Policy
    properties:
      enableInboundForwarding: true
      enableLogging: true
      alternativeNameServerConfig:
        targetNameServers:
          - ipv4Address: 172.16.1.10
            forwardingPath: private
          - ipv4Address: 172.16.1.20
      networks:
        - networkUrl: ${["network-1"].id}
        - networkUrl: ${["network-2"].id}
  network-1:
    type: gcp:compute:Network
    properties:
      autoCreateSubnetworks: false
  network-2:
    type: gcp:compute:Network
    properties:
      autoCreateSubnetworks: false

Create Policy Resource

new Policy(name: string, args?: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           alternative_name_server_config: Optional[PolicyAlternativeNameServerConfigArgs] = None,
           description: Optional[str] = None,
           enable_inbound_forwarding: Optional[bool] = None,
           enable_logging: Optional[bool] = None,
           name: Optional[str] = None,
           networks: Optional[Sequence[PolicyNetworkArgs]] = None,
           project: Optional[str] = None)
@overload
def Policy(resource_name: str,
           args: Optional[PolicyArgs] = None,
           opts: Optional[ResourceOptions] = None)
func NewPolicy(ctx *Context, name string, args *PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs? args = null, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: gcp:dns:Policy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PolicyArgs
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 PolicyArgs
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 PolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Policy 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 Policy resource accepts the following input properties:

AlternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

Description string

A textual description field. Defaults to 'Managed by Pulumi'.

EnableInboundForwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

EnableLogging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

Name string

User assigned name for this policy.

Networks List<PolicyNetworkArgs>

List of network names specifying networks to which this policy is applied. Structure is documented below.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

AlternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

Description string

A textual description field. Defaults to 'Managed by Pulumi'.

EnableInboundForwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

EnableLogging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

Name string

User assigned name for this policy.

Networks []PolicyNetworkArgs

List of network names specifying networks to which this policy is applied. Structure is documented below.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description String

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding Boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging Boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name String

User assigned name for this policy.

networks List<PolicyNetworkArgs>

List of network names specifying networks to which this policy is applied. Structure is documented below.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description string

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name string

User assigned name for this policy.

networks PolicyNetworkArgs[]

List of network names specifying networks to which this policy is applied. Structure is documented below.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternative_name_server_config PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description str

A textual description field. Defaults to 'Managed by Pulumi'.

enable_inbound_forwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enable_logging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name str

User assigned name for this policy.

networks Sequence[PolicyNetworkArgs]

List of network names specifying networks to which this policy is applied. Structure is documented below.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig Property Map

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description String

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding Boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging Boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name String

User assigned name for this policy.

networks List<Property Map>

List of network names specifying networks to which this policy is applied. Structure is documented below.

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 Policy resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Policy Resource

Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        alternative_name_server_config: Optional[PolicyAlternativeNameServerConfigArgs] = None,
        description: Optional[str] = None,
        enable_inbound_forwarding: Optional[bool] = None,
        enable_logging: Optional[bool] = None,
        name: Optional[str] = None,
        networks: Optional[Sequence[PolicyNetworkArgs]] = None,
        project: Optional[str] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
public static Policy get(String name, Output<String> id, PolicyState 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:
AlternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

Description string

A textual description field. Defaults to 'Managed by Pulumi'.

EnableInboundForwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

EnableLogging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

Name string

User assigned name for this policy.

Networks List<PolicyNetworkArgs>

List of network names specifying networks to which this policy is applied. Structure is documented below.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

AlternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

Description string

A textual description field. Defaults to 'Managed by Pulumi'.

EnableInboundForwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

EnableLogging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

Name string

User assigned name for this policy.

Networks []PolicyNetworkArgs

List of network names specifying networks to which this policy is applied. Structure is documented below.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description String

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding Boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging Boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name String

User assigned name for this policy.

networks List<PolicyNetworkArgs>

List of network names specifying networks to which this policy is applied. Structure is documented below.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description string

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name string

User assigned name for this policy.

networks PolicyNetworkArgs[]

List of network names specifying networks to which this policy is applied. Structure is documented below.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternative_name_server_config PolicyAlternativeNameServerConfigArgs

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description str

A textual description field. Defaults to 'Managed by Pulumi'.

enable_inbound_forwarding bool

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enable_logging bool

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name str

User assigned name for this policy.

networks Sequence[PolicyNetworkArgs]

List of network names specifying networks to which this policy is applied. Structure is documented below.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

alternativeNameServerConfig Property Map

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

description String

A textual description field. Defaults to 'Managed by Pulumi'.

enableInboundForwarding Boolean

Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.

enableLogging Boolean

Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.

name String

User assigned name for this policy.

networks List<Property Map>

List of network names specifying networks to which this policy is applied. Structure is documented below.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Supporting Types

PolicyAlternativeNameServerConfig

TargetNameServers List<PolicyAlternativeNameServerConfigTargetNameServer>

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

TargetNameServers []PolicyAlternativeNameServerConfigTargetNameServer

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

targetNameServers List<PolicyAlternativeNameServerConfigTargetNameServer>

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

targetNameServers PolicyAlternativeNameServerConfigTargetNameServer[]

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

target_name_servers Sequence[PolicyAlternativeNameServerConfigTargetNameServer]

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

targetNameServers List<Property Map>

Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.

PolicyAlternativeNameServerConfigTargetNameServer

Ipv4Address string

IPv4 address to forward to.

ForwardingPath string

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

Ipv4Address string

IPv4 address to forward to.

ForwardingPath string

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

ipv4Address String

IPv4 address to forward to.

forwardingPath String

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

ipv4Address string

IPv4 address to forward to.

forwardingPath string

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

ipv4_address str

IPv4 address to forward to.

forwarding_path str

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

ipv4Address String

IPv4 address to forward to.

forwardingPath String

Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are default and private.

PolicyNetwork

NetworkUrl string

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

NetworkUrl string

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

networkUrl String

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

networkUrl string

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

network_url str

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

networkUrl String

The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

Import

Policy can be imported using any of these accepted formats

 $ pulumi import gcp:dns/policy:Policy default projects/{{project}}/policies/{{name}}
 $ pulumi import gcp:dns/policy:Policy default {{project}}/{{name}}
 $ pulumi import gcp:dns/policy:Policy default {{name}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.