1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dns
  5. ResponsePolicyRule
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.dns.ResponsePolicyRule

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    A Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dns_name field with the longest matching suffix.

    Example Usage

    Dns Response Policy Rule Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network_1 = new gcp.compute.Network("network-1", {
        name: "network-1",
        autoCreateSubnetworks: false,
    });
    const network_2 = new gcp.compute.Network("network-2", {
        name: "network-2",
        autoCreateSubnetworks: false,
    });
    const response_policy = new gcp.dns.ResponsePolicy("response-policy", {
        responsePolicyName: "example-response-policy",
        networks: [
            {
                networkUrl: network_1.id,
            },
            {
                networkUrl: network_2.id,
            },
        ],
    });
    const example_response_policy_rule = new gcp.dns.ResponsePolicyRule("example-response-policy-rule", {
        responsePolicy: response_policy.responsePolicyName,
        ruleName: "example-rule",
        dnsName: "dns.example.com.",
        localData: {
            localDatas: [{
                name: "dns.example.com.",
                type: "A",
                ttl: 300,
                rrdatas: ["192.0.2.91"],
            }],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network_1 = gcp.compute.Network("network-1",
        name="network-1",
        auto_create_subnetworks=False)
    network_2 = gcp.compute.Network("network-2",
        name="network-2",
        auto_create_subnetworks=False)
    response_policy = gcp.dns.ResponsePolicy("response-policy",
        response_policy_name="example-response-policy",
        networks=[
            {
                "network_url": network_1.id,
            },
            {
                "network_url": network_2.id,
            },
        ])
    example_response_policy_rule = gcp.dns.ResponsePolicyRule("example-response-policy-rule",
        response_policy=response_policy.response_policy_name,
        rule_name="example-rule",
        dns_name="dns.example.com.",
        local_data={
            "local_datas": [{
                "name": "dns.example.com.",
                "type": "A",
                "ttl": 300,
                "rrdatas": ["192.0.2.91"],
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/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{
    			Name:                  pulumi.String("network-1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetwork(ctx, "network-2", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-2"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewResponsePolicy(ctx, "response-policy", &dns.ResponsePolicyArgs{
    			ResponsePolicyName: pulumi.String("example-response-policy"),
    			Networks: dns.ResponsePolicyNetworkArray{
    				&dns.ResponsePolicyNetworkArgs{
    					NetworkUrl: network_1.ID(),
    				},
    				&dns.ResponsePolicyNetworkArgs{
    					NetworkUrl: network_2.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewResponsePolicyRule(ctx, "example-response-policy-rule", &dns.ResponsePolicyRuleArgs{
    			ResponsePolicy: response_policy.ResponsePolicyName,
    			RuleName:       pulumi.String("example-rule"),
    			DnsName:        pulumi.String("dns.example.com."),
    			LocalData: &dns.ResponsePolicyRuleLocalDataArgs{
    				LocalDatas: dns.ResponsePolicyRuleLocalDataLocalDataArray{
    					&dns.ResponsePolicyRuleLocalDataLocalDataArgs{
    						Name: pulumi.String("dns.example.com."),
    						Type: pulumi.String("A"),
    						Ttl:  pulumi.Int(300),
    						Rrdatas: pulumi.StringArray{
    							pulumi.String("192.0.2.91"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network_1 = new Gcp.Compute.Network("network-1", new()
        {
            Name = "network-1",
            AutoCreateSubnetworks = false,
        });
    
        var network_2 = new Gcp.Compute.Network("network-2", new()
        {
            Name = "network-2",
            AutoCreateSubnetworks = false,
        });
    
        var response_policy = new Gcp.Dns.ResponsePolicy("response-policy", new()
        {
            ResponsePolicyName = "example-response-policy",
            Networks = new[]
            {
                new Gcp.Dns.Inputs.ResponsePolicyNetworkArgs
                {
                    NetworkUrl = network_1.Id,
                },
                new Gcp.Dns.Inputs.ResponsePolicyNetworkArgs
                {
                    NetworkUrl = network_2.Id,
                },
            },
        });
    
        var example_response_policy_rule = new Gcp.Dns.ResponsePolicyRule("example-response-policy-rule", new()
        {
            ResponsePolicy = response_policy.ResponsePolicyName,
            RuleName = "example-rule",
            DnsName = "dns.example.com.",
            LocalData = new Gcp.Dns.Inputs.ResponsePolicyRuleLocalDataArgs
            {
                LocalDatas = new[]
                {
                    new Gcp.Dns.Inputs.ResponsePolicyRuleLocalDataLocalDataArgs
                    {
                        Name = "dns.example.com.",
                        Type = "A",
                        Ttl = 300,
                        Rrdatas = new[]
                        {
                            "192.0.2.91",
                        },
                    },
                },
            },
        });
    
    });
    
    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.ResponsePolicy;
    import com.pulumi.gcp.dns.ResponsePolicyArgs;
    import com.pulumi.gcp.dns.inputs.ResponsePolicyNetworkArgs;
    import com.pulumi.gcp.dns.ResponsePolicyRule;
    import com.pulumi.gcp.dns.ResponsePolicyRuleArgs;
    import com.pulumi.gcp.dns.inputs.ResponsePolicyRuleLocalDataArgs;
    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()
                .name("network-1")
                .autoCreateSubnetworks(false)
                .build());
    
            var network_2 = new Network("network-2", NetworkArgs.builder()
                .name("network-2")
                .autoCreateSubnetworks(false)
                .build());
    
            var response_policy = new ResponsePolicy("response-policy", ResponsePolicyArgs.builder()
                .responsePolicyName("example-response-policy")
                .networks(            
                    ResponsePolicyNetworkArgs.builder()
                        .networkUrl(network_1.id())
                        .build(),
                    ResponsePolicyNetworkArgs.builder()
                        .networkUrl(network_2.id())
                        .build())
                .build());
    
            var example_response_policy_rule = new ResponsePolicyRule("example-response-policy-rule", ResponsePolicyRuleArgs.builder()
                .responsePolicy(response_policy.responsePolicyName())
                .ruleName("example-rule")
                .dnsName("dns.example.com.")
                .localData(ResponsePolicyRuleLocalDataArgs.builder()
                    .localDatas(ResponsePolicyRuleLocalDataLocalDataArgs.builder()
                        .name("dns.example.com.")
                        .type("A")
                        .ttl(300)
                        .rrdatas("192.0.2.91")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      network-1:
        type: gcp:compute:Network
        properties:
          name: network-1
          autoCreateSubnetworks: false
      network-2:
        type: gcp:compute:Network
        properties:
          name: network-2
          autoCreateSubnetworks: false
      response-policy:
        type: gcp:dns:ResponsePolicy
        properties:
          responsePolicyName: example-response-policy
          networks:
            - networkUrl: ${["network-1"].id}
            - networkUrl: ${["network-2"].id}
      example-response-policy-rule:
        type: gcp:dns:ResponsePolicyRule
        properties:
          responsePolicy: ${["response-policy"].responsePolicyName}
          ruleName: example-rule
          dnsName: dns.example.com.
          localData:
            localDatas:
              - name: dns.example.com.
                type: A
                ttl: 300
                rrdatas:
                  - 192.0.2.91
    

    Create ResponsePolicyRule Resource

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

    Constructor syntax

    new ResponsePolicyRule(name: string, args: ResponsePolicyRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ResponsePolicyRule(resource_name: str,
                           args: ResponsePolicyRuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResponsePolicyRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           dns_name: Optional[str] = None,
                           response_policy: Optional[str] = None,
                           rule_name: Optional[str] = None,
                           behavior: Optional[str] = None,
                           local_data: Optional[ResponsePolicyRuleLocalDataArgs] = None,
                           project: Optional[str] = None)
    func NewResponsePolicyRule(ctx *Context, name string, args ResponsePolicyRuleArgs, opts ...ResourceOption) (*ResponsePolicyRule, error)
    public ResponsePolicyRule(string name, ResponsePolicyRuleArgs args, CustomResourceOptions? opts = null)
    public ResponsePolicyRule(String name, ResponsePolicyRuleArgs args)
    public ResponsePolicyRule(String name, ResponsePolicyRuleArgs args, CustomResourceOptions options)
    
    type: gcp:dns:ResponsePolicyRule
    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 ResponsePolicyRuleArgs
    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 ResponsePolicyRuleArgs
    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 ResponsePolicyRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResponsePolicyRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResponsePolicyRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var responsePolicyRuleResource = new Gcp.Dns.ResponsePolicyRule("responsePolicyRuleResource", new()
    {
        DnsName = "string",
        ResponsePolicy = "string",
        RuleName = "string",
        Behavior = "string",
        LocalData = new Gcp.Dns.Inputs.ResponsePolicyRuleLocalDataArgs
        {
            LocalDatas = new[]
            {
                new Gcp.Dns.Inputs.ResponsePolicyRuleLocalDataLocalDataArgs
                {
                    Name = "string",
                    Type = "string",
                    Rrdatas = new[]
                    {
                        "string",
                    },
                    Ttl = 0,
                },
            },
        },
        Project = "string",
    });
    
    example, err := dns.NewResponsePolicyRule(ctx, "responsePolicyRuleResource", &dns.ResponsePolicyRuleArgs{
    	DnsName:        pulumi.String("string"),
    	ResponsePolicy: pulumi.String("string"),
    	RuleName:       pulumi.String("string"),
    	Behavior:       pulumi.String("string"),
    	LocalData: &dns.ResponsePolicyRuleLocalDataArgs{
    		LocalDatas: dns.ResponsePolicyRuleLocalDataLocalDataArray{
    			&dns.ResponsePolicyRuleLocalDataLocalDataArgs{
    				Name: pulumi.String("string"),
    				Type: pulumi.String("string"),
    				Rrdatas: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Ttl: pulumi.Int(0),
    			},
    		},
    	},
    	Project: pulumi.String("string"),
    })
    
    var responsePolicyRuleResource = new ResponsePolicyRule("responsePolicyRuleResource", ResponsePolicyRuleArgs.builder()
        .dnsName("string")
        .responsePolicy("string")
        .ruleName("string")
        .behavior("string")
        .localData(ResponsePolicyRuleLocalDataArgs.builder()
            .localDatas(ResponsePolicyRuleLocalDataLocalDataArgs.builder()
                .name("string")
                .type("string")
                .rrdatas("string")
                .ttl(0)
                .build())
            .build())
        .project("string")
        .build());
    
    response_policy_rule_resource = gcp.dns.ResponsePolicyRule("responsePolicyRuleResource",
        dns_name="string",
        response_policy="string",
        rule_name="string",
        behavior="string",
        local_data={
            "localDatas": [{
                "name": "string",
                "type": "string",
                "rrdatas": ["string"],
                "ttl": 0,
            }],
        },
        project="string")
    
    const responsePolicyRuleResource = new gcp.dns.ResponsePolicyRule("responsePolicyRuleResource", {
        dnsName: "string",
        responsePolicy: "string",
        ruleName: "string",
        behavior: "string",
        localData: {
            localDatas: [{
                name: "string",
                type: "string",
                rrdatas: ["string"],
                ttl: 0,
            }],
        },
        project: "string",
    });
    
    type: gcp:dns:ResponsePolicyRule
    properties:
        behavior: string
        dnsName: string
        localData:
            localDatas:
                - name: string
                  rrdatas:
                    - string
                  ttl: 0
                  type: string
        project: string
        responsePolicy: string
        ruleName: string
    

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

    DnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    ResponsePolicy string
    Identifies the response policy addressed by this request.


    RuleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    Behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    LocalData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    DnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    ResponsePolicy string
    Identifies the response policy addressed by this request.


    RuleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    Behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    LocalData ResponsePolicyRuleLocalDataArgs
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    dnsName String
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    responsePolicy String
    Identifies the response policy addressed by this request.


    ruleName String
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior String
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    localData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    dnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    responsePolicy string
    Identifies the response policy addressed by this request.


    ruleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    localData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    dns_name str
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    response_policy str
    Identifies the response policy addressed by this request.


    rule_name str
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior str
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    local_data ResponsePolicyRuleLocalDataArgs
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    dnsName String
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    responsePolicy String
    Identifies the response policy addressed by this request.


    ruleName String
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior String
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    localData Property Map
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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 ResponsePolicyRule 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 ResponsePolicyRule Resource

    Get an existing ResponsePolicyRule 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?: ResponsePolicyRuleState, opts?: CustomResourceOptions): ResponsePolicyRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            behavior: Optional[str] = None,
            dns_name: Optional[str] = None,
            local_data: Optional[ResponsePolicyRuleLocalDataArgs] = None,
            project: Optional[str] = None,
            response_policy: Optional[str] = None,
            rule_name: Optional[str] = None) -> ResponsePolicyRule
    func GetResponsePolicyRule(ctx *Context, name string, id IDInput, state *ResponsePolicyRuleState, opts ...ResourceOption) (*ResponsePolicyRule, error)
    public static ResponsePolicyRule Get(string name, Input<string> id, ResponsePolicyRuleState? state, CustomResourceOptions? opts = null)
    public static ResponsePolicyRule get(String name, Output<String> id, ResponsePolicyRuleState 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:
    Behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    DnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    LocalData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    ResponsePolicy string
    Identifies the response policy addressed by this request.


    RuleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    Behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    DnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    LocalData ResponsePolicyRuleLocalDataArgs
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    ResponsePolicy string
    Identifies the response policy addressed by this request.


    RuleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior String
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    dnsName String
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    localData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    responsePolicy String
    Identifies the response policy addressed by this request.


    ruleName String
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior string
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    dnsName string
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    localData ResponsePolicyRuleLocalData
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    responsePolicy string
    Identifies the response policy addressed by this request.


    ruleName string
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior str
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    dns_name str
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    local_data ResponsePolicyRuleLocalDataArgs
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    response_policy str
    Identifies the response policy addressed by this request.


    rule_name str
    An identifier for this rule. Must be unique with the ResponsePolicy.
    behavior String
    Answer this query with a behavior rather than DNS data. Acceptable values are 'behaviorUnspecified', and 'bypassResponsePolicy'
    dnsName String
    The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
    localData Property Map
    Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. 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.
    responsePolicy String
    Identifies the response policy addressed by this request.


    ruleName String
    An identifier for this rule. Must be unique with the ResponsePolicy.

    Supporting Types

    ResponsePolicyRuleLocalData, ResponsePolicyRuleLocalDataArgs

    LocalDatas List<ResponsePolicyRuleLocalDataLocalData>
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.
    LocalDatas []ResponsePolicyRuleLocalDataLocalData
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.
    localDatas List<ResponsePolicyRuleLocalDataLocalData>
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.
    localDatas ResponsePolicyRuleLocalDataLocalData[]
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.
    local_datas Sequence[ResponsePolicyRuleLocalDataLocalData]
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.
    localDatas List<Property Map>
    All resource record sets for this selector, one per resource record type. The name must match the dns_name. Structure is documented below.

    ResponsePolicyRuleLocalDataLocalData, ResponsePolicyRuleLocalDataLocalDataArgs

    Name string
    For example, www.example.com.
    Type string
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    Rrdatas List<string>
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    Ttl int
    Number of seconds that this ResourceRecordSet can be cached by resolvers.
    Name string
    For example, www.example.com.
    Type string
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    Rrdatas []string
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    Ttl int
    Number of seconds that this ResourceRecordSet can be cached by resolvers.
    name String
    For example, www.example.com.
    type String
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    rrdatas List<String>
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    ttl Integer
    Number of seconds that this ResourceRecordSet can be cached by resolvers.
    name string
    For example, www.example.com.
    type string
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    rrdatas string[]
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    ttl number
    Number of seconds that this ResourceRecordSet can be cached by resolvers.
    name str
    For example, www.example.com.
    type str
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    rrdatas Sequence[str]
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    ttl int
    Number of seconds that this ResourceRecordSet can be cached by resolvers.
    name String
    For example, www.example.com.
    type String
    One of valid DNS resource types. Possible values are: A, AAAA, CAA, CNAME, DNSKEY, DS, HTTPS, IPSECVPNKEY, MX, NAPTR, NS, PTR, SOA, SPF, SRV, SSHFP, SVCB, TLSA, TXT.
    rrdatas List<String>
    As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)
    ttl Number
    Number of seconds that this ResourceRecordSet can be cached by resolvers.

    Import

    ResponsePolicyRule can be imported using any of these accepted formats:

    • projects/{{project}}/responsePolicies/{{response_policy}}/rules/{{rule_name}}

    • {{project}}/{{response_policy}}/{{rule_name}}

    • {{response_policy}}/{{rule_name}}

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

    $ pulumi import gcp:dns/responsePolicyRule:ResponsePolicyRule default projects/{{project}}/responsePolicies/{{response_policy}}/rules/{{rule_name}}
    
    $ pulumi import gcp:dns/responsePolicyRule:ResponsePolicyRule default {{project}}/{{response_policy}}/{{rule_name}}
    
    $ pulumi import gcp:dns/responsePolicyRule:ResponsePolicyRule default {{response_policy}}/{{rule_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 v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi