Google Cloud (GCP) Classic

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

ResponsePolicy

Import

ResponsePolicy can be imported using any of these accepted formats

 $ pulumi import gcp:dns/responsePolicy:ResponsePolicy default projects/{{project}}/responsePolicies/{{response_policy_name}}
 $ pulumi import gcp:dns/responsePolicy:ResponsePolicy default {{project}}/{{response_policy_name}}
 $ pulumi import gcp:dns/responsePolicy:ResponsePolicy default {{response_policy_name}}

Example Usage

Dns Response 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,
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

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

    var subnetwork_1 = new Gcp.Compute.Subnetwork("subnetwork-1", new()
    {
        Network = network_1.Name,
        IpCidrRange = "10.0.36.0/24",
        Region = "us-central1",
        PrivateIpGoogleAccess = true,
        SecondaryIpRanges = new[]
        {
            new Gcp.Compute.Inputs.SubnetworkSecondaryIpRangeArgs
            {
                RangeName = "pod",
                IpCidrRange = "10.0.0.0/19",
            },
            new Gcp.Compute.Inputs.SubnetworkSecondaryIpRangeArgs
            {
                RangeName = "svc",
                IpCidrRange = "10.0.32.0/22",
            },
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

    var cluster_1 = new Gcp.Container.Cluster("cluster-1", new()
    {
        Location = "us-central1-c",
        InitialNodeCount = 1,
        NetworkingMode = "VPC_NATIVE",
        DefaultSnatStatus = new Gcp.Container.Inputs.ClusterDefaultSnatStatusArgs
        {
            Disabled = true,
        },
        Network = network_1.Name,
        Subnetwork = subnetwork_1.Name,
        PrivateClusterConfig = new Gcp.Container.Inputs.ClusterPrivateClusterConfigArgs
        {
            EnablePrivateEndpoint = true,
            EnablePrivateNodes = true,
            MasterIpv4CidrBlock = "10.42.0.0/28",
            MasterGlobalAccessConfig = new Gcp.Container.Inputs.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs
            {
                Enabled = true,
            },
        },
        MasterAuthorizedNetworksConfig = null,
        IpAllocationPolicy = new Gcp.Container.Inputs.ClusterIpAllocationPolicyArgs
        {
            ClusterSecondaryRangeName = subnetwork_1.SecondaryIpRanges.Apply(secondaryIpRanges => secondaryIpRanges[0].RangeName),
            ServicesSecondaryRangeName = subnetwork_1.SecondaryIpRanges.Apply(secondaryIpRanges => secondaryIpRanges[1].RangeName),
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

    var example_response_policy = new Gcp.Dns.ResponsePolicy("example-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,
            },
        },
        GkeClusters = new[]
        {
            new Gcp.Dns.Inputs.ResponsePolicyGkeClusterArgs
            {
                GkeClusterName = cluster_1.Id,
            },
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container"
	"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),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = compute.NewNetwork(ctx, "network-2", &compute.NetworkArgs{
			AutoCreateSubnetworks: pulumi.Bool(false),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = compute.NewSubnetwork(ctx, "subnetwork-1", &compute.SubnetworkArgs{
			Network:               network_1.Name,
			IpCidrRange:           pulumi.String("10.0.36.0/24"),
			Region:                pulumi.String("us-central1"),
			PrivateIpGoogleAccess: pulumi.Bool(true),
			SecondaryIpRanges: compute.SubnetworkSecondaryIpRangeArray{
				&compute.SubnetworkSecondaryIpRangeArgs{
					RangeName:   pulumi.String("pod"),
					IpCidrRange: pulumi.String("10.0.0.0/19"),
				},
				&compute.SubnetworkSecondaryIpRangeArgs{
					RangeName:   pulumi.String("svc"),
					IpCidrRange: pulumi.String("10.0.32.0/22"),
				},
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = container.NewCluster(ctx, "cluster-1", &container.ClusterArgs{
			Location:         pulumi.String("us-central1-c"),
			InitialNodeCount: pulumi.Int(1),
			NetworkingMode:   pulumi.String("VPC_NATIVE"),
			DefaultSnatStatus: &container.ClusterDefaultSnatStatusArgs{
				Disabled: pulumi.Bool(true),
			},
			Network:    network_1.Name,
			Subnetwork: subnetwork_1.Name,
			PrivateClusterConfig: &container.ClusterPrivateClusterConfigArgs{
				EnablePrivateEndpoint: pulumi.Bool(true),
				EnablePrivateNodes:    pulumi.Bool(true),
				MasterIpv4CidrBlock:   pulumi.String("10.42.0.0/28"),
				MasterGlobalAccessConfig: &container.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs{
					Enabled: pulumi.Bool(true),
				},
			},
			MasterAuthorizedNetworksConfig: nil,
			IpAllocationPolicy: &container.ClusterIpAllocationPolicyArgs{
				ClusterSecondaryRangeName: subnetwork_1.SecondaryIpRanges.ApplyT(func(secondaryIpRanges []compute.SubnetworkSecondaryIpRange) (string, error) {
					return secondaryIpRanges[0].RangeName, nil
				}).(pulumi.StringOutput),
				ServicesSecondaryRangeName: subnetwork_1.SecondaryIpRanges.ApplyT(func(secondaryIpRanges []compute.SubnetworkSecondaryIpRange) (string, error) {
					return secondaryIpRanges[1].RangeName, nil
				}).(pulumi.StringOutput),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = dns.NewResponsePolicy(ctx, "example-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(),
				},
			},
			GkeClusters: dns.ResponsePolicyGkeClusterArray{
				&dns.ResponsePolicyGkeClusterArgs{
					GkeClusterName: cluster_1.ID(),
				},
			},
		}, pulumi.Provider(google_beta))
		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.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.compute.inputs.SubnetworkSecondaryIpRangeArgs;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterDefaultSnatStatusArgs;
import com.pulumi.gcp.container.inputs.ClusterPrivateClusterConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterMasterAuthorizedNetworksConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterIpAllocationPolicyArgs;
import com.pulumi.gcp.dns.ResponsePolicy;
import com.pulumi.gcp.dns.ResponsePolicyArgs;
import com.pulumi.gcp.dns.inputs.ResponsePolicyNetworkArgs;
import com.pulumi.gcp.dns.inputs.ResponsePolicyGkeClusterArgs;
import com.pulumi.resources.CustomResourceOptions;
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(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

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

        var subnetwork_1 = new Subnetwork("subnetwork-1", SubnetworkArgs.builder()        
            .network(network_1.name())
            .ipCidrRange("10.0.36.0/24")
            .region("us-central1")
            .privateIpGoogleAccess(true)
            .secondaryIpRanges(            
                SubnetworkSecondaryIpRangeArgs.builder()
                    .rangeName("pod")
                    .ipCidrRange("10.0.0.0/19")
                    .build(),
                SubnetworkSecondaryIpRangeArgs.builder()
                    .rangeName("svc")
                    .ipCidrRange("10.0.32.0/22")
                    .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var cluster_1 = new Cluster("cluster-1", ClusterArgs.builder()        
            .location("us-central1-c")
            .initialNodeCount(1)
            .networkingMode("VPC_NATIVE")
            .defaultSnatStatus(ClusterDefaultSnatStatusArgs.builder()
                .disabled(true)
                .build())
            .network(network_1.name())
            .subnetwork(subnetwork_1.name())
            .privateClusterConfig(ClusterPrivateClusterConfigArgs.builder()
                .enablePrivateEndpoint(true)
                .enablePrivateNodes(true)
                .masterIpv4CidrBlock("10.42.0.0/28")
                .masterGlobalAccessConfig(ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs.builder()
                    .enabled(true)
                    .build())
                .build())
            .masterAuthorizedNetworksConfig()
            .ipAllocationPolicy(ClusterIpAllocationPolicyArgs.builder()
                .clusterSecondaryRangeName(subnetwork_1.secondaryIpRanges().applyValue(secondaryIpRanges -> secondaryIpRanges[0].rangeName()))
                .servicesSecondaryRangeName(subnetwork_1.secondaryIpRanges().applyValue(secondaryIpRanges -> secondaryIpRanges[1].rangeName()))
                .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var example_response_policy = new ResponsePolicy("example-response-policy", ResponsePolicyArgs.builder()        
            .responsePolicyName("example-response-policy")
            .networks(            
                ResponsePolicyNetworkArgs.builder()
                    .networkUrl(network_1.id())
                    .build(),
                ResponsePolicyNetworkArgs.builder()
                    .networkUrl(network_2.id())
                    .build())
            .gkeClusters(ResponsePolicyGkeClusterArgs.builder()
                .gkeClusterName(cluster_1.id())
                .build())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

network_1 = gcp.compute.Network("network-1", auto_create_subnetworks=False,
opts=pulumi.ResourceOptions(provider=google_beta))
network_2 = gcp.compute.Network("network-2", auto_create_subnetworks=False,
opts=pulumi.ResourceOptions(provider=google_beta))
subnetwork_1 = gcp.compute.Subnetwork("subnetwork-1",
    network=network_1.name,
    ip_cidr_range="10.0.36.0/24",
    region="us-central1",
    private_ip_google_access=True,
    secondary_ip_ranges=[
        gcp.compute.SubnetworkSecondaryIpRangeArgs(
            range_name="pod",
            ip_cidr_range="10.0.0.0/19",
        ),
        gcp.compute.SubnetworkSecondaryIpRangeArgs(
            range_name="svc",
            ip_cidr_range="10.0.32.0/22",
        ),
    ],
    opts=pulumi.ResourceOptions(provider=google_beta))
cluster_1 = gcp.container.Cluster("cluster-1",
    location="us-central1-c",
    initial_node_count=1,
    networking_mode="VPC_NATIVE",
    default_snat_status=gcp.container.ClusterDefaultSnatStatusArgs(
        disabled=True,
    ),
    network=network_1.name,
    subnetwork=subnetwork_1.name,
    private_cluster_config=gcp.container.ClusterPrivateClusterConfigArgs(
        enable_private_endpoint=True,
        enable_private_nodes=True,
        master_ipv4_cidr_block="10.42.0.0/28",
        master_global_access_config=gcp.container.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs(
            enabled=True,
        ),
    ),
    master_authorized_networks_config=gcp.container.ClusterMasterAuthorizedNetworksConfigArgs(),
    ip_allocation_policy=gcp.container.ClusterIpAllocationPolicyArgs(
        cluster_secondary_range_name=subnetwork_1.secondary_ip_ranges[0].range_name,
        services_secondary_range_name=subnetwork_1.secondary_ip_ranges[1].range_name,
    ),
    opts=pulumi.ResourceOptions(provider=google_beta))
example_response_policy = gcp.dns.ResponsePolicy("example-response-policy",
    response_policy_name="example-response-policy",
    networks=[
        gcp.dns.ResponsePolicyNetworkArgs(
            network_url=network_1.id,
        ),
        gcp.dns.ResponsePolicyNetworkArgs(
            network_url=network_2.id,
        ),
    ],
    gke_clusters=[gcp.dns.ResponsePolicyGkeClusterArgs(
        gke_cluster_name=cluster_1.id,
    )],
    opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const network_1 = new gcp.compute.Network("network-1", {autoCreateSubnetworks: false}, {
    provider: google_beta,
});
const network_2 = new gcp.compute.Network("network-2", {autoCreateSubnetworks: false}, {
    provider: google_beta,
});
const subnetwork_1 = new gcp.compute.Subnetwork("subnetwork-1", {
    network: network_1.name,
    ipCidrRange: "10.0.36.0/24",
    region: "us-central1",
    privateIpGoogleAccess: true,
    secondaryIpRanges: [
        {
            rangeName: "pod",
            ipCidrRange: "10.0.0.0/19",
        },
        {
            rangeName: "svc",
            ipCidrRange: "10.0.32.0/22",
        },
    ],
}, {
    provider: google_beta,
});
const cluster_1 = new gcp.container.Cluster("cluster-1", {
    location: "us-central1-c",
    initialNodeCount: 1,
    networkingMode: "VPC_NATIVE",
    defaultSnatStatus: {
        disabled: true,
    },
    network: network_1.name,
    subnetwork: subnetwork_1.name,
    privateClusterConfig: {
        enablePrivateEndpoint: true,
        enablePrivateNodes: true,
        masterIpv4CidrBlock: "10.42.0.0/28",
        masterGlobalAccessConfig: {
            enabled: true,
        },
    },
    masterAuthorizedNetworksConfig: {},
    ipAllocationPolicy: {
        clusterSecondaryRangeName: subnetwork_1.secondaryIpRanges.apply(secondaryIpRanges => secondaryIpRanges[0].rangeName),
        servicesSecondaryRangeName: subnetwork_1.secondaryIpRanges.apply(secondaryIpRanges => secondaryIpRanges[1].rangeName),
    },
}, {
    provider: google_beta,
});
const example_response_policy = new gcp.dns.ResponsePolicy("example-response-policy", {
    responsePolicyName: "example-response-policy",
    networks: [
        {
            networkUrl: network_1.id,
        },
        {
            networkUrl: network_2.id,
        },
    ],
    gkeClusters: [{
        gkeClusterName: cluster_1.id,
    }],
}, {
    provider: google_beta,
});
resources:
  network-1:
    type: gcp:compute:Network
    properties:
      autoCreateSubnetworks: false
    options:
      provider: ${["google-beta"]}
  network-2:
    type: gcp:compute:Network
    properties:
      autoCreateSubnetworks: false
    options:
      provider: ${["google-beta"]}
  subnetwork-1:
    type: gcp:compute:Subnetwork
    properties:
      network: ${["network-1"].name}
      ipCidrRange: 10.0.36.0/24
      region: us-central1
      privateIpGoogleAccess: true
      secondaryIpRanges:
        - rangeName: pod
          ipCidrRange: 10.0.0.0/19
        - rangeName: svc
          ipCidrRange: 10.0.32.0/22
    options:
      provider: ${["google-beta"]}
  cluster-1:
    type: gcp:container:Cluster
    properties:
      location: us-central1-c
      initialNodeCount: 1
      networkingMode: VPC_NATIVE
      defaultSnatStatus:
        disabled: true
      network: ${["network-1"].name}
      subnetwork: ${["subnetwork-1"].name}
      privateClusterConfig:
        enablePrivateEndpoint: true
        enablePrivateNodes: true
        masterIpv4CidrBlock: 10.42.0.0/28
        masterGlobalAccessConfig:
          enabled: true
      masterAuthorizedNetworksConfig: {}
      ipAllocationPolicy:
        clusterSecondaryRangeName: ${["subnetwork-1"].secondaryIpRanges[0].rangeName}
        servicesSecondaryRangeName: ${["subnetwork-1"].secondaryIpRanges[1].rangeName}
    options:
      provider: ${["google-beta"]}
  example-response-policy:
    type: gcp:dns:ResponsePolicy
    properties:
      responsePolicyName: example-response-policy
      networks:
        - networkUrl: ${["network-1"].id}
        - networkUrl: ${["network-2"].id}
      gkeClusters:
        - gkeClusterName: ${["cluster-1"].id}
    options:
      provider: ${["google-beta"]}

Create ResponsePolicy Resource

new ResponsePolicy(name: string, args: ResponsePolicyArgs, opts?: CustomResourceOptions);
@overload
def ResponsePolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   description: Optional[str] = None,
                   gke_clusters: Optional[Sequence[ResponsePolicyGkeClusterArgs]] = None,
                   networks: Optional[Sequence[ResponsePolicyNetworkArgs]] = None,
                   project: Optional[str] = None,
                   response_policy_name: Optional[str] = None)
@overload
def ResponsePolicy(resource_name: str,
                   args: ResponsePolicyArgs,
                   opts: Optional[ResourceOptions] = None)
func NewResponsePolicy(ctx *Context, name string, args ResponsePolicyArgs, opts ...ResourceOption) (*ResponsePolicy, error)
public ResponsePolicy(string name, ResponsePolicyArgs args, CustomResourceOptions? opts = null)
public ResponsePolicy(String name, ResponsePolicyArgs args)
public ResponsePolicy(String name, ResponsePolicyArgs args, CustomResourceOptions options)
type: gcp:dns:ResponsePolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

ResponsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

Description string

The description of the response policy, such as My new response policy.

GkeClusters List<ResponsePolicyGkeClusterArgs>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

Networks List<ResponsePolicyNetworkArgs>

The 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.

ResponsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

Description string

The description of the response policy, such as My new response policy.

GkeClusters []ResponsePolicyGkeClusterArgs

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

Networks []ResponsePolicyNetworkArgs

The 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.

responsePolicyName String

The user assigned name for this Response Policy, such as myresponsepolicy.

description String

The description of the response policy, such as My new response policy.

gkeClusters List<ResponsePolicyGkeClusterArgs>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks List<ResponsePolicyNetworkArgs>

The 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.

responsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

description string

The description of the response policy, such as My new response policy.

gkeClusters ResponsePolicyGkeClusterArgs[]

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks ResponsePolicyNetworkArgs[]

The 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.

response_policy_name str

The user assigned name for this Response Policy, such as myresponsepolicy.

description str

The description of the response policy, such as My new response policy.

gke_clusters Sequence[ResponsePolicyGkeClusterArgs]

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks Sequence[ResponsePolicyNetworkArgs]

The 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.

responsePolicyName String

The user assigned name for this Response Policy, such as myresponsepolicy.

description String

The description of the response policy, such as My new response policy.

gkeClusters List<Property Map>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks List<Property Map>

The 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 ResponsePolicy 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 ResponsePolicy Resource

Get an existing ResponsePolicy 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?: ResponsePolicyState, opts?: CustomResourceOptions): ResponsePolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        gke_clusters: Optional[Sequence[ResponsePolicyGkeClusterArgs]] = None,
        networks: Optional[Sequence[ResponsePolicyNetworkArgs]] = None,
        project: Optional[str] = None,
        response_policy_name: Optional[str] = None) -> ResponsePolicy
func GetResponsePolicy(ctx *Context, name string, id IDInput, state *ResponsePolicyState, opts ...ResourceOption) (*ResponsePolicy, error)
public static ResponsePolicy Get(string name, Input<string> id, ResponsePolicyState? state, CustomResourceOptions? opts = null)
public static ResponsePolicy get(String name, Output<String> id, ResponsePolicyState 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:
Description string

The description of the response policy, such as My new response policy.

GkeClusters List<ResponsePolicyGkeClusterArgs>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

Networks List<ResponsePolicyNetworkArgs>

The 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.

ResponsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

Description string

The description of the response policy, such as My new response policy.

GkeClusters []ResponsePolicyGkeClusterArgs

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

Networks []ResponsePolicyNetworkArgs

The 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.

ResponsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

description String

The description of the response policy, such as My new response policy.

gkeClusters List<ResponsePolicyGkeClusterArgs>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks List<ResponsePolicyNetworkArgs>

The 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.

responsePolicyName String

The user assigned name for this Response Policy, such as myresponsepolicy.

description string

The description of the response policy, such as My new response policy.

gkeClusters ResponsePolicyGkeClusterArgs[]

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks ResponsePolicyNetworkArgs[]

The 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.

responsePolicyName string

The user assigned name for this Response Policy, such as myresponsepolicy.

description str

The description of the response policy, such as My new response policy.

gke_clusters Sequence[ResponsePolicyGkeClusterArgs]

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks Sequence[ResponsePolicyNetworkArgs]

The 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.

response_policy_name str

The user assigned name for this Response Policy, such as myresponsepolicy.

description String

The description of the response policy, such as My new response policy.

gkeClusters List<Property Map>

The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.

networks List<Property Map>

The 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.

responsePolicyName String

The user assigned name for this Response Policy, such as myresponsepolicy.

Supporting Types

ResponsePolicyGkeCluster

GkeClusterName string

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

GkeClusterName string

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

gkeClusterName String

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

gkeClusterName string

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

gke_cluster_name str

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

gkeClusterName String

The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

ResponsePolicyNetwork

NetworkUrl string

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

NetworkUrl string

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

networkUrl String

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

networkUrl string

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

network_url str

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

networkUrl String

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

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.