google::dns-policy

Creates a dns policy.

Example

google::dns-policy dns-policy-example
    name: "dns-policy-example"
    description: "DNS Policy Example"

    network
        network: $(google::compute-network managed-zone-network-example)
    end

    alternative-name-server-config
        target-name-server
            ipv4-address: "10.0.0.1"
        end
    end
end

Attributes

Attribute Description
alternative-name-server-config subresource

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.

target-name-server list subresource

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. (Required)

ipv4-address
IPv4 address to forward to. (Required)
description A mutable string of at most 1024 characters associated with this resource for the user’s convenience. Has no effect on the policy’s function. (Required)
enable-inbound-forwarding 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 Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
name User assigned name for this policy. (Required)
network list subresource

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

network resource

The VPC network to bind to. (Required)