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

gcp.gkebackup.RestorePlan

Explore with Pulumi AI

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

    Represents a Restore Plan instance.

    To get more information about RestorePlan, see:

    Example Usage

    Gkebackup Restoreplan All Namespaces

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "restore-all-ns-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "restore-all-ns",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const allNs = new gcp.gkebackup.RestorePlan("all_ns", {
        name: "restore-all-ns",
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            allNamespaces: true,
            namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
            volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
            clusterResourceRestoreScope: {
                allGroupKinds: true,
            },
            clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="restore-all-ns-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="restore-all-ns",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    all_ns = gcp.gkebackup.RestorePlan("all_ns",
        name="restore-all-ns",
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            all_namespaces=True,
            namespaced_resource_restore_mode="FAIL_ON_CONFLICT",
            volume_data_restore_policy="RESTORE_VOLUME_DATA_FROM_BACKUP",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                all_group_kinds=True,
            ),
            cluster_resource_conflict_policy="USE_EXISTING_VERSION",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("restore-all-ns-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("restore-all-ns"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "all_ns", &gkebackup.RestorePlanArgs{
    			Name:       pulumi.String("restore-all-ns"),
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				AllNamespaces:                 pulumi.Bool(true),
    				NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
    				VolumeDataRestorePolicy:       pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					AllGroupKinds: pulumi.Bool(true),
    				},
    				ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "restore-all-ns-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "restore-all-ns",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var allNs = new Gcp.GkeBackup.RestorePlan("all_ns", new()
        {
            Name = "restore-all-ns",
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                AllNamespaces = true,
                NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
                VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    AllGroupKinds = true,
                },
                ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("restore-all-ns-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("restore-all-ns")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var allNs = new RestorePlan("allNs", RestorePlanArgs.builder()        
                .name("restore-all-ns")
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .allNamespaces(true)
                    .namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
                    .volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .allGroupKinds(true)
                        .build())
                    .clusterResourceConflictPolicy("USE_EXISTING_VERSION")
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: restore-all-ns-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: restore-all-ns
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      allNs:
        type: gcp:gkebackup:RestorePlan
        name: all_ns
        properties:
          name: restore-all-ns
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            allNamespaces: true
            namespacedResourceRestoreMode: FAIL_ON_CONFLICT
            volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
            clusterResourceRestoreScope:
              allGroupKinds: true
            clusterResourceConflictPolicy: USE_EXISTING_VERSION
    

    Gkebackup Restoreplan Rollback Namespace

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "rollback-ns-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "rollback-ns",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const rollbackNs = new gcp.gkebackup.RestorePlan("rollback_ns", {
        name: "rollback-ns-rp",
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            selectedNamespaces: {
                namespaces: ["my-ns"],
            },
            namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
            volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
            clusterResourceRestoreScope: {
                selectedGroupKinds: [
                    {
                        resourceGroup: "apiextension.k8s.io",
                        resourceKind: "CustomResourceDefinition",
                    },
                    {
                        resourceGroup: "storage.k8s.io",
                        resourceKind: "StorageClass",
                    },
                ],
            },
            clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="rollback-ns-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="rollback-ns",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    rollback_ns = gcp.gkebackup.RestorePlan("rollback_ns",
        name="rollback-ns-rp",
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            selected_namespaces=gcp.gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs(
                namespaces=["my-ns"],
            ),
            namespaced_resource_restore_mode="DELETE_AND_RESTORE",
            volume_data_restore_policy="RESTORE_VOLUME_DATA_FROM_BACKUP",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                selected_group_kinds=[
                    gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs(
                        resource_group="apiextension.k8s.io",
                        resource_kind="CustomResourceDefinition",
                    ),
                    gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs(
                        resource_group="storage.k8s.io",
                        resource_kind="StorageClass",
                    ),
                ],
            ),
            cluster_resource_conflict_policy="USE_EXISTING_VERSION",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("rollback-ns-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("rollback-ns"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "rollback_ns", &gkebackup.RestorePlanArgs{
    			Name:       pulumi.String("rollback-ns-rp"),
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
    					Namespaces: pulumi.StringArray{
    						pulumi.String("my-ns"),
    					},
    				},
    				NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
    				VolumeDataRestorePolicy:       pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					SelectedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArray{
    						&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
    							ResourceGroup: pulumi.String("apiextension.k8s.io"),
    							ResourceKind:  pulumi.String("CustomResourceDefinition"),
    						},
    						&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
    							ResourceGroup: pulumi.String("storage.k8s.io"),
    							ResourceKind:  pulumi.String("StorageClass"),
    						},
    					},
    				},
    				ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "rollback-ns-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "rollback-ns",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var rollbackNs = new Gcp.GkeBackup.RestorePlan("rollback_ns", new()
        {
            Name = "rollback-ns-rp",
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
                {
                    Namespaces = new[]
                    {
                        "my-ns",
                    },
                },
                NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
                VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    SelectedGroupKinds = new[]
                    {
                        new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
                        {
                            ResourceGroup = "apiextension.k8s.io",
                            ResourceKind = "CustomResourceDefinition",
                        },
                        new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
                        {
                            ResourceGroup = "storage.k8s.io",
                            ResourceKind = "StorageClass",
                        },
                    },
                },
                ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedNamespacesArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("rollback-ns-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("rollback-ns")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var rollbackNs = new RestorePlan("rollbackNs", RestorePlanArgs.builder()        
                .name("rollback-ns-rp")
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
                        .namespaces("my-ns")
                        .build())
                    .namespacedResourceRestoreMode("DELETE_AND_RESTORE")
                    .volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .selectedGroupKinds(                    
                            RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
                                .resourceGroup("apiextension.k8s.io")
                                .resourceKind("CustomResourceDefinition")
                                .build(),
                            RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
                                .resourceGroup("storage.k8s.io")
                                .resourceKind("StorageClass")
                                .build())
                        .build())
                    .clusterResourceConflictPolicy("USE_EXISTING_VERSION")
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: rollback-ns-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: rollback-ns
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      rollbackNs:
        type: gcp:gkebackup:RestorePlan
        name: rollback_ns
        properties:
          name: rollback-ns-rp
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            selectedNamespaces:
              namespaces:
                - my-ns
            namespacedResourceRestoreMode: DELETE_AND_RESTORE
            volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
            clusterResourceRestoreScope:
              selectedGroupKinds:
                - resourceGroup: apiextension.k8s.io
                  resourceKind: CustomResourceDefinition
                - resourceGroup: storage.k8s.io
                  resourceKind: StorageClass
            clusterResourceConflictPolicy: USE_EXISTING_VERSION
    

    Gkebackup Restoreplan Protected Application

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "rollback-app-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "rollback-app",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const rollbackApp = new gcp.gkebackup.RestorePlan("rollback_app", {
        name: "rollback-app-rp",
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            selectedApplications: {
                namespacedNames: [{
                    name: "my-app",
                    namespace: "my-ns",
                }],
            },
            namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
            volumeDataRestorePolicy: "REUSE_VOLUME_HANDLE_FROM_BACKUP",
            clusterResourceRestoreScope: {
                noGroupKinds: true,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="rollback-app-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="rollback-app",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    rollback_app = gcp.gkebackup.RestorePlan("rollback_app",
        name="rollback-app-rp",
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            selected_applications=gcp.gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs(
                namespaced_names=[gcp.gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs(
                    name="my-app",
                    namespace="my-ns",
                )],
            ),
            namespaced_resource_restore_mode="DELETE_AND_RESTORE",
            volume_data_restore_policy="REUSE_VOLUME_HANDLE_FROM_BACKUP",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                no_group_kinds=True,
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("rollback-app-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("rollback-app"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "rollback_app", &gkebackup.RestorePlanArgs{
    			Name:       pulumi.String("rollback-app-rp"),
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				SelectedApplications: &gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs{
    					NamespacedNames: gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArray{
    						&gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs{
    							Name:      pulumi.String("my-app"),
    							Namespace: pulumi.String("my-ns"),
    						},
    					},
    				},
    				NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
    				VolumeDataRestorePolicy:       pulumi.String("REUSE_VOLUME_HANDLE_FROM_BACKUP"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					NoGroupKinds: pulumi.Bool(true),
    				},
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "rollback-app-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "rollback-app",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var rollbackApp = new Gcp.GkeBackup.RestorePlan("rollback_app", new()
        {
            Name = "rollback-app-rp",
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                SelectedApplications = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsArgs
                {
                    NamespacedNames = new[]
                    {
                        new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs
                        {
                            Name = "my-app",
                            Namespace = "my-ns",
                        },
                    },
                },
                NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
                VolumeDataRestorePolicy = "REUSE_VOLUME_HANDLE_FROM_BACKUP",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    NoGroupKinds = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedApplicationsArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("rollback-app-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("rollback-app")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var rollbackApp = new RestorePlan("rollbackApp", RestorePlanArgs.builder()        
                .name("rollback-app-rp")
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .selectedApplications(RestorePlanRestoreConfigSelectedApplicationsArgs.builder()
                        .namespacedNames(RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs.builder()
                            .name("my-app")
                            .namespace("my-ns")
                            .build())
                        .build())
                    .namespacedResourceRestoreMode("DELETE_AND_RESTORE")
                    .volumeDataRestorePolicy("REUSE_VOLUME_HANDLE_FROM_BACKUP")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .noGroupKinds(true)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: rollback-app-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: rollback-app
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      rollbackApp:
        type: gcp:gkebackup:RestorePlan
        name: rollback_app
        properties:
          name: rollback-app-rp
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            selectedApplications:
              namespacedNames:
                - name: my-app
                  namespace: my-ns
            namespacedResourceRestoreMode: DELETE_AND_RESTORE
            volumeDataRestorePolicy: REUSE_VOLUME_HANDLE_FROM_BACKUP
            clusterResourceRestoreScope:
              noGroupKinds: true
    

    Gkebackup Restoreplan All Cluster Resources

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "all-groupkinds-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "all-groupkinds",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const allClusterResources = new gcp.gkebackup.RestorePlan("all_cluster_resources", {
        name: "all-groupkinds-rp",
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            noNamespaces: true,
            namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
            clusterResourceRestoreScope: {
                allGroupKinds: true,
            },
            clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="all-groupkinds-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="all-groupkinds",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    all_cluster_resources = gcp.gkebackup.RestorePlan("all_cluster_resources",
        name="all-groupkinds-rp",
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            no_namespaces=True,
            namespaced_resource_restore_mode="FAIL_ON_CONFLICT",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                all_group_kinds=True,
            ),
            cluster_resource_conflict_policy="USE_EXISTING_VERSION",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("all-groupkinds-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("all-groupkinds"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "all_cluster_resources", &gkebackup.RestorePlanArgs{
    			Name:       pulumi.String("all-groupkinds-rp"),
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				NoNamespaces:                  pulumi.Bool(true),
    				NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					AllGroupKinds: pulumi.Bool(true),
    				},
    				ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "all-groupkinds-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "all-groupkinds",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var allClusterResources = new Gcp.GkeBackup.RestorePlan("all_cluster_resources", new()
        {
            Name = "all-groupkinds-rp",
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                NoNamespaces = true,
                NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    AllGroupKinds = true,
                },
                ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("all-groupkinds-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("all-groupkinds")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var allClusterResources = new RestorePlan("allClusterResources", RestorePlanArgs.builder()        
                .name("all-groupkinds-rp")
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .noNamespaces(true)
                    .namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .allGroupKinds(true)
                        .build())
                    .clusterResourceConflictPolicy("USE_EXISTING_VERSION")
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: all-groupkinds-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: all-groupkinds
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      allClusterResources:
        type: gcp:gkebackup:RestorePlan
        name: all_cluster_resources
        properties:
          name: all-groupkinds-rp
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            noNamespaces: true
            namespacedResourceRestoreMode: FAIL_ON_CONFLICT
            clusterResourceRestoreScope:
              allGroupKinds: true
            clusterResourceConflictPolicy: USE_EXISTING_VERSION
    

    Gkebackup Restoreplan Rename Namespace

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "rename-ns-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "rename-ns",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const renameNs = new gcp.gkebackup.RestorePlan("rename_ns", {
        name: "rename-ns-rp",
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            selectedNamespaces: {
                namespaces: ["ns1"],
            },
            namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
            volumeDataRestorePolicy: "REUSE_VOLUME_HANDLE_FROM_BACKUP",
            clusterResourceRestoreScope: {
                noGroupKinds: true,
            },
            transformationRules: [
                {
                    description: "rename namespace from ns1 to ns2",
                    resourceFilter: {
                        groupKinds: [{
                            resourceKind: "Namespace",
                        }],
                        jsonPath: ".metadata[?(@.name == 'ns1')]",
                    },
                    fieldActions: [{
                        op: "REPLACE",
                        path: "/metadata/name",
                        value: "ns2",
                    }],
                },
                {
                    description: "move all resources from ns1 to ns2",
                    resourceFilter: {
                        namespaces: ["ns1"],
                    },
                    fieldActions: [{
                        op: "REPLACE",
                        path: "/metadata/namespace",
                        value: "ns2",
                    }],
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="rename-ns-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="rename-ns",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    rename_ns = gcp.gkebackup.RestorePlan("rename_ns",
        name="rename-ns-rp",
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            selected_namespaces=gcp.gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs(
                namespaces=["ns1"],
            ),
            namespaced_resource_restore_mode="FAIL_ON_CONFLICT",
            volume_data_restore_policy="REUSE_VOLUME_HANDLE_FROM_BACKUP",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                no_group_kinds=True,
            ),
            transformation_rules=[
                gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleArgs(
                    description="rename namespace from ns1 to ns2",
                    resource_filter=gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs(
                        group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs(
                            resource_kind="Namespace",
                        )],
                        json_path=".metadata[?(@.name == 'ns1')]",
                    ),
                    field_actions=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs(
                        op="REPLACE",
                        path="/metadata/name",
                        value="ns2",
                    )],
                ),
                gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleArgs(
                    description="move all resources from ns1 to ns2",
                    resource_filter=gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs(
                        namespaces=["ns1"],
                    ),
                    field_actions=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs(
                        op="REPLACE",
                        path="/metadata/namespace",
                        value="ns2",
                    )],
                ),
            ],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("rename-ns-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("rename-ns"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "rename_ns", &gkebackup.RestorePlanArgs{
    			Name:       pulumi.String("rename-ns-rp"),
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
    					Namespaces: pulumi.StringArray{
    						pulumi.String("ns1"),
    					},
    				},
    				NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
    				VolumeDataRestorePolicy:       pulumi.String("REUSE_VOLUME_HANDLE_FROM_BACKUP"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					NoGroupKinds: pulumi.Bool(true),
    				},
    				TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
    					&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
    						Description: pulumi.String("rename namespace from ns1 to ns2"),
    						ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
    							GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
    								&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
    									ResourceKind: pulumi.String("Namespace"),
    								},
    							},
    							JsonPath: pulumi.String(".metadata[?(@.name == 'ns1')]"),
    						},
    						FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
    							&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
    								Op:    pulumi.String("REPLACE"),
    								Path:  pulumi.String("/metadata/name"),
    								Value: pulumi.String("ns2"),
    							},
    						},
    					},
    					&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
    						Description: pulumi.String("move all resources from ns1 to ns2"),
    						ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
    							Namespaces: pulumi.StringArray{
    								pulumi.String("ns1"),
    							},
    						},
    						FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
    							&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
    								Op:    pulumi.String("REPLACE"),
    								Path:  pulumi.String("/metadata/namespace"),
    								Value: pulumi.String("ns2"),
    							},
    						},
    					},
    				},
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "rename-ns-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "rename-ns",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var renameNs = new Gcp.GkeBackup.RestorePlan("rename_ns", new()
        {
            Name = "rename-ns-rp",
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
                {
                    Namespaces = new[]
                    {
                        "ns1",
                    },
                },
                NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
                VolumeDataRestorePolicy = "REUSE_VOLUME_HANDLE_FROM_BACKUP",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    NoGroupKinds = true,
                },
                TransformationRules = new[]
                {
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
                    {
                        Description = "rename namespace from ns1 to ns2",
                        ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
                        {
                            GroupKinds = new[]
                            {
                                new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
                                {
                                    ResourceKind = "Namespace",
                                },
                            },
                            JsonPath = ".metadata[?(@.name == 'ns1')]",
                        },
                        FieldActions = new[]
                        {
                            new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
                            {
                                Op = "REPLACE",
                                Path = "/metadata/name",
                                Value = "ns2",
                            },
                        },
                    },
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
                    {
                        Description = "move all resources from ns1 to ns2",
                        ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
                        {
                            Namespaces = new[]
                            {
                                "ns1",
                            },
                        },
                        FieldActions = new[]
                        {
                            new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
                            {
                                Op = "REPLACE",
                                Path = "/metadata/namespace",
                                Value = "ns2",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedNamespacesArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("rename-ns-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("rename-ns")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var renameNs = new RestorePlan("renameNs", RestorePlanArgs.builder()        
                .name("rename-ns-rp")
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
                        .namespaces("ns1")
                        .build())
                    .namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
                    .volumeDataRestorePolicy("REUSE_VOLUME_HANDLE_FROM_BACKUP")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .noGroupKinds(true)
                        .build())
                    .transformationRules(                
                        RestorePlanRestoreConfigTransformationRuleArgs.builder()
                            .description("rename namespace from ns1 to ns2")
                            .resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
                                .groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
                                    .resourceKind("Namespace")
                                    .build())
                                .jsonPath(".metadata[?(@.name == 'ns1')]")
                                .build())
                            .fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
                                .op("REPLACE")
                                .path("/metadata/name")
                                .value("ns2")
                                .build())
                            .build(),
                        RestorePlanRestoreConfigTransformationRuleArgs.builder()
                            .description("move all resources from ns1 to ns2")
                            .resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
                                .namespaces("ns1")
                                .build())
                            .fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
                                .op("REPLACE")
                                .path("/metadata/namespace")
                                .value("ns2")
                                .build())
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: rename-ns-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: rename-ns
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      renameNs:
        type: gcp:gkebackup:RestorePlan
        name: rename_ns
        properties:
          name: rename-ns-rp
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            selectedNamespaces:
              namespaces:
                - ns1
            namespacedResourceRestoreMode: FAIL_ON_CONFLICT
            volumeDataRestorePolicy: REUSE_VOLUME_HANDLE_FROM_BACKUP
            clusterResourceRestoreScope:
              noGroupKinds: true
            transformationRules:
              - description: rename namespace from ns1 to ns2
                resourceFilter:
                  groupKinds:
                    - resourceKind: Namespace
                  jsonPath: .metadata[?(@.name == 'ns1')]
                fieldActions:
                  - op: REPLACE
                    path: /metadata/name
                    value: ns2
              - description: move all resources from ns1 to ns2
                resourceFilter:
                  namespaces:
                    - ns1
                fieldActions:
                  - op: REPLACE
                    path: /metadata/namespace
                    value: ns2
    

    Gkebackup Restoreplan Second Transformation

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "transform-rule-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: "",
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "transform-rule",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    const transformRule = new gcp.gkebackup.RestorePlan("transform_rule", {
        name: "transform-rule-rp",
        description: "copy nginx env variables",
        labels: {
            app: "nginx",
        },
        location: "us-central1",
        backupPlan: basic.id,
        cluster: primary.id,
        restoreConfig: {
            excludedNamespaces: {
                namespaces: ["my-ns"],
            },
            namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
            volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
            clusterResourceRestoreScope: {
                excludedGroupKinds: [{
                    resourceGroup: "apiextension.k8s.io",
                    resourceKind: "CustomResourceDefinition",
                }],
            },
            clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
            transformationRules: [{
                description: "Copy environment variables from the nginx container to the install init container.",
                resourceFilter: {
                    groupKinds: [{
                        resourceKind: "Pod",
                        resourceGroup: "",
                    }],
                    jsonPath: ".metadata[?(@.name == 'nginx')]",
                },
                fieldActions: [{
                    op: "COPY",
                    path: "/spec/initContainers/0/env",
                    fromPath: "/spec/containers/0/env",
                }],
            }],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="transform-rule-cluster",
        location="us-central1",
        initial_node_count=1,
        workload_identity_config=gcp.container.ClusterWorkloadIdentityConfigArgs(
            workload_pool="my-project-name.svc.id.goog",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection="",
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="transform-rule",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=True,
        ))
    transform_rule = gcp.gkebackup.RestorePlan("transform_rule",
        name="transform-rule-rp",
        description="copy nginx env variables",
        labels={
            "app": "nginx",
        },
        location="us-central1",
        backup_plan=basic.id,
        cluster=primary.id,
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            excluded_namespaces=gcp.gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs(
                namespaces=["my-ns"],
            ),
            namespaced_resource_restore_mode="DELETE_AND_RESTORE",
            volume_data_restore_policy="RESTORE_VOLUME_DATA_FROM_BACKUP",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                excluded_group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs(
                    resource_group="apiextension.k8s.io",
                    resource_kind="CustomResourceDefinition",
                )],
            ),
            cluster_resource_conflict_policy="USE_EXISTING_VERSION",
            transformation_rules=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleArgs(
                description="Copy environment variables from the nginx container to the install init container.",
                resource_filter=gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs(
                    group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs(
                        resource_kind="Pod",
                        resource_group="",
                    )],
                    json_path=".metadata[?(@.name == 'nginx')]",
                ),
                field_actions=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs(
                    op="COPY",
                    path="/spec/initContainers/0/env",
                    from_path="/spec/containers/0/env",
                )],
            )],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkebackup"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
    			Name:             pulumi.String("transform-rule-cluster"),
    			Location:         pulumi.String("us-central1"),
    			InitialNodeCount: pulumi.Int(1),
    			WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
    				WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(""),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("transform-rule"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				AllNamespaces:     pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewRestorePlan(ctx, "transform_rule", &gkebackup.RestorePlanArgs{
    			Name:        pulumi.String("transform-rule-rp"),
    			Description: pulumi.String("copy nginx env variables"),
    			Labels: pulumi.StringMap{
    				"app": pulumi.String("nginx"),
    			},
    			Location:   pulumi.String("us-central1"),
    			BackupPlan: basic.ID(),
    			Cluster:    primary.ID(),
    			RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    				ExcludedNamespaces: &gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs{
    					Namespaces: pulumi.StringArray{
    						pulumi.String("my-ns"),
    					},
    				},
    				NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
    				VolumeDataRestorePolicy:       pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
    				ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    					ExcludedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArray{
    						&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs{
    							ResourceGroup: pulumi.String("apiextension.k8s.io"),
    							ResourceKind:  pulumi.String("CustomResourceDefinition"),
    						},
    					},
    				},
    				ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
    				TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
    					&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
    						Description: pulumi.String("Copy environment variables from the nginx container to the install init container."),
    						ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
    							GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
    								&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
    									ResourceKind:  pulumi.String("Pod"),
    									ResourceGroup: pulumi.String(""),
    								},
    							},
    							JsonPath: pulumi.String(".metadata[?(@.name == 'nginx')]"),
    						},
    						FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
    							&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
    								Op:       pulumi.String("COPY"),
    								Path:     pulumi.String("/spec/initContainers/0/env"),
    								FromPath: pulumi.String("/spec/containers/0/env"),
    							},
    						},
    					},
    				},
    			},
    		})
    		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 primary = new Gcp.Container.Cluster("primary", new()
        {
            Name = "transform-rule-cluster",
            Location = "us-central1",
            InitialNodeCount = 1,
            WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
            {
                WorkloadPool = "my-project-name.svc.id.goog",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = "",
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "transform-rule",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = true,
            },
        });
    
        var transformRule = new Gcp.GkeBackup.RestorePlan("transform_rule", new()
        {
            Name = "transform-rule-rp",
            Description = "copy nginx env variables",
            Labels = 
            {
                { "app", "nginx" },
            },
            Location = "us-central1",
            BackupPlan = basic.Id,
            Cluster = primary.Id,
            RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
            {
                ExcludedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigExcludedNamespacesArgs
                {
                    Namespaces = new[]
                    {
                        "my-ns",
                    },
                },
                NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
                VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
                ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
                {
                    ExcludedGroupKinds = new[]
                    {
                        new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs
                        {
                            ResourceGroup = "apiextension.k8s.io",
                            ResourceKind = "CustomResourceDefinition",
                        },
                    },
                },
                ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
                TransformationRules = new[]
                {
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
                    {
                        Description = "Copy environment variables from the nginx container to the install init container.",
                        ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
                        {
                            GroupKinds = new[]
                            {
                                new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
                                {
                                    ResourceKind = "Pod",
                                    ResourceGroup = "",
                                },
                            },
                            JsonPath = ".metadata[?(@.name == 'nginx')]",
                        },
                        FieldActions = new[]
                        {
                            new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
                            {
                                Op = "COPY",
                                Path = "/spec/initContainers/0/env",
                                FromPath = "/spec/containers/0/env",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.RestorePlan;
    import com.pulumi.gcp.gkebackup.RestorePlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigExcludedNamespacesArgs;
    import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
    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 primary = new Cluster("primary", ClusterArgs.builder()        
                .name("transform-rule-cluster")
                .location("us-central1")
                .initialNodeCount(1)
                .workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
                    .workloadPool("my-project-name.svc.id.goog")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("transform-rule")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
            var transformRule = new RestorePlan("transformRule", RestorePlanArgs.builder()        
                .name("transform-rule-rp")
                .description("copy nginx env variables")
                .labels(Map.of("app", "nginx"))
                .location("us-central1")
                .backupPlan(basic.id())
                .cluster(primary.id())
                .restoreConfig(RestorePlanRestoreConfigArgs.builder()
                    .excludedNamespaces(RestorePlanRestoreConfigExcludedNamespacesArgs.builder()
                        .namespaces("my-ns")
                        .build())
                    .namespacedResourceRestoreMode("DELETE_AND_RESTORE")
                    .volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
                    .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                        .excludedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs.builder()
                            .resourceGroup("apiextension.k8s.io")
                            .resourceKind("CustomResourceDefinition")
                            .build())
                        .build())
                    .clusterResourceConflictPolicy("USE_EXISTING_VERSION")
                    .transformationRules(RestorePlanRestoreConfigTransformationRuleArgs.builder()
                        .description("Copy environment variables from the nginx container to the install init container.")
                        .resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
                            .groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
                                .resourceKind("Pod")
                                .resourceGroup("")
                                .build())
                            .jsonPath(".metadata[?(@.name == 'nginx')]")
                            .build())
                        .fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
                            .op("COPY")
                            .path("/spec/initContainers/0/env")
                            .fromPath("/spec/containers/0/env")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: transform-rule-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection:
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: transform-rule
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
      transformRule:
        type: gcp:gkebackup:RestorePlan
        name: transform_rule
        properties:
          name: transform-rule-rp
          description: copy nginx env variables
          labels:
            app: nginx
          location: us-central1
          backupPlan: ${basic.id}
          cluster: ${primary.id}
          restoreConfig:
            excludedNamespaces:
              namespaces:
                - my-ns
            namespacedResourceRestoreMode: DELETE_AND_RESTORE
            volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
            clusterResourceRestoreScope:
              excludedGroupKinds:
                - resourceGroup: apiextension.k8s.io
                  resourceKind: CustomResourceDefinition
            clusterResourceConflictPolicy: USE_EXISTING_VERSION
            transformationRules:
              - description: Copy environment variables from the nginx container to the install init container.
                resourceFilter:
                  groupKinds:
                    - resourceKind: Pod
                      resourceGroup:
                  jsonPath: .metadata[?(@.name == 'nginx')]
                fieldActions:
                  - op: COPY
                    path: /spec/initContainers/0/env
                    fromPath: /spec/containers/0/env
    

    Create RestorePlan Resource

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

    Constructor syntax

    new RestorePlan(name: string, args: RestorePlanArgs, opts?: CustomResourceOptions);
    @overload
    def RestorePlan(resource_name: str,
                    args: RestorePlanArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def RestorePlan(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    backup_plan: Optional[str] = None,
                    cluster: Optional[str] = None,
                    location: Optional[str] = None,
                    restore_config: Optional[RestorePlanRestoreConfigArgs] = None,
                    description: Optional[str] = None,
                    labels: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    project: Optional[str] = None)
    func NewRestorePlan(ctx *Context, name string, args RestorePlanArgs, opts ...ResourceOption) (*RestorePlan, error)
    public RestorePlan(string name, RestorePlanArgs args, CustomResourceOptions? opts = null)
    public RestorePlan(String name, RestorePlanArgs args)
    public RestorePlan(String name, RestorePlanArgs args, CustomResourceOptions options)
    
    type: gcp:gkebackup:RestorePlan
    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 RestorePlanArgs
    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 RestorePlanArgs
    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 RestorePlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RestorePlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RestorePlanArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var restorePlanResource = new Gcp.GkeBackup.RestorePlan("restorePlanResource", new()
    {
        BackupPlan = "string",
        Cluster = "string",
        Location = "string",
        RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
        {
            AllNamespaces = false,
            ClusterResourceConflictPolicy = "string",
            ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
            {
                AllGroupKinds = false,
                ExcludedGroupKinds = new[]
                {
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs
                    {
                        ResourceGroup = "string",
                        ResourceKind = "string",
                    },
                },
                NoGroupKinds = false,
                SelectedGroupKinds = new[]
                {
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
                    {
                        ResourceGroup = "string",
                        ResourceKind = "string",
                    },
                },
            },
            ExcludedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigExcludedNamespacesArgs
            {
                Namespaces = new[]
                {
                    "string",
                },
            },
            NamespacedResourceRestoreMode = "string",
            NoNamespaces = false,
            SelectedApplications = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsArgs
            {
                NamespacedNames = new[]
                {
                    new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs
                    {
                        Name = "string",
                        Namespace = "string",
                    },
                },
            },
            SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
            {
                Namespaces = new[]
                {
                    "string",
                },
            },
            TransformationRules = new[]
            {
                new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
                {
                    FieldActions = new[]
                    {
                        new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
                        {
                            Op = "string",
                            FromPath = "string",
                            Path = "string",
                            Value = "string",
                        },
                    },
                    Description = "string",
                    ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
                    {
                        GroupKinds = new[]
                        {
                            new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
                            {
                                ResourceGroup = "string",
                                ResourceKind = "string",
                            },
                        },
                        JsonPath = "string",
                        Namespaces = new[]
                        {
                            "string",
                        },
                    },
                },
            },
            VolumeDataRestorePolicy = "string",
        },
        Description = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Project = "string",
    });
    
    example, err := gkebackup.NewRestorePlan(ctx, "restorePlanResource", &gkebackup.RestorePlanArgs{
    	BackupPlan: pulumi.String("string"),
    	Cluster:    pulumi.String("string"),
    	Location:   pulumi.String("string"),
    	RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
    		AllNamespaces:                 pulumi.Bool(false),
    		ClusterResourceConflictPolicy: pulumi.String("string"),
    		ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
    			AllGroupKinds: pulumi.Bool(false),
    			ExcludedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArray{
    				&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs{
    					ResourceGroup: pulumi.String("string"),
    					ResourceKind:  pulumi.String("string"),
    				},
    			},
    			NoGroupKinds: pulumi.Bool(false),
    			SelectedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArray{
    				&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
    					ResourceGroup: pulumi.String("string"),
    					ResourceKind:  pulumi.String("string"),
    				},
    			},
    		},
    		ExcludedNamespaces: &gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs{
    			Namespaces: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		NamespacedResourceRestoreMode: pulumi.String("string"),
    		NoNamespaces:                  pulumi.Bool(false),
    		SelectedApplications: &gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs{
    			NamespacedNames: gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArray{
    				&gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs{
    					Name:      pulumi.String("string"),
    					Namespace: pulumi.String("string"),
    				},
    			},
    		},
    		SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
    			Namespaces: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
    			&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
    				FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
    					&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
    						Op:       pulumi.String("string"),
    						FromPath: pulumi.String("string"),
    						Path:     pulumi.String("string"),
    						Value:    pulumi.String("string"),
    					},
    				},
    				Description: pulumi.String("string"),
    				ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
    					GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
    						&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
    							ResourceGroup: pulumi.String("string"),
    							ResourceKind:  pulumi.String("string"),
    						},
    					},
    					JsonPath: pulumi.String("string"),
    					Namespaces: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    		VolumeDataRestorePolicy: pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Project: pulumi.String("string"),
    })
    
    var restorePlanResource = new RestorePlan("restorePlanResource", RestorePlanArgs.builder()        
        .backupPlan("string")
        .cluster("string")
        .location("string")
        .restoreConfig(RestorePlanRestoreConfigArgs.builder()
            .allNamespaces(false)
            .clusterResourceConflictPolicy("string")
            .clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
                .allGroupKinds(false)
                .excludedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs.builder()
                    .resourceGroup("string")
                    .resourceKind("string")
                    .build())
                .noGroupKinds(false)
                .selectedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
                    .resourceGroup("string")
                    .resourceKind("string")
                    .build())
                .build())
            .excludedNamespaces(RestorePlanRestoreConfigExcludedNamespacesArgs.builder()
                .namespaces("string")
                .build())
            .namespacedResourceRestoreMode("string")
            .noNamespaces(false)
            .selectedApplications(RestorePlanRestoreConfigSelectedApplicationsArgs.builder()
                .namespacedNames(RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs.builder()
                    .name("string")
                    .namespace("string")
                    .build())
                .build())
            .selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
                .namespaces("string")
                .build())
            .transformationRules(RestorePlanRestoreConfigTransformationRuleArgs.builder()
                .fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
                    .op("string")
                    .fromPath("string")
                    .path("string")
                    .value("string")
                    .build())
                .description("string")
                .resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
                    .groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
                        .resourceGroup("string")
                        .resourceKind("string")
                        .build())
                    .jsonPath("string")
                    .namespaces("string")
                    .build())
                .build())
            .volumeDataRestorePolicy("string")
            .build())
        .description("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .project("string")
        .build());
    
    restore_plan_resource = gcp.gkebackup.RestorePlan("restorePlanResource",
        backup_plan="string",
        cluster="string",
        location="string",
        restore_config=gcp.gkebackup.RestorePlanRestoreConfigArgs(
            all_namespaces=False,
            cluster_resource_conflict_policy="string",
            cluster_resource_restore_scope=gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs(
                all_group_kinds=False,
                excluded_group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs(
                    resource_group="string",
                    resource_kind="string",
                )],
                no_group_kinds=False,
                selected_group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs(
                    resource_group="string",
                    resource_kind="string",
                )],
            ),
            excluded_namespaces=gcp.gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs(
                namespaces=["string"],
            ),
            namespaced_resource_restore_mode="string",
            no_namespaces=False,
            selected_applications=gcp.gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs(
                namespaced_names=[gcp.gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs(
                    name="string",
                    namespace="string",
                )],
            ),
            selected_namespaces=gcp.gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs(
                namespaces=["string"],
            ),
            transformation_rules=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleArgs(
                field_actions=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs(
                    op="string",
                    from_path="string",
                    path="string",
                    value="string",
                )],
                description="string",
                resource_filter=gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs(
                    group_kinds=[gcp.gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs(
                        resource_group="string",
                        resource_kind="string",
                    )],
                    json_path="string",
                    namespaces=["string"],
                ),
            )],
            volume_data_restore_policy="string",
        ),
        description="string",
        labels={
            "string": "string",
        },
        name="string",
        project="string")
    
    const restorePlanResource = new gcp.gkebackup.RestorePlan("restorePlanResource", {
        backupPlan: "string",
        cluster: "string",
        location: "string",
        restoreConfig: {
            allNamespaces: false,
            clusterResourceConflictPolicy: "string",
            clusterResourceRestoreScope: {
                allGroupKinds: false,
                excludedGroupKinds: [{
                    resourceGroup: "string",
                    resourceKind: "string",
                }],
                noGroupKinds: false,
                selectedGroupKinds: [{
                    resourceGroup: "string",
                    resourceKind: "string",
                }],
            },
            excludedNamespaces: {
                namespaces: ["string"],
            },
            namespacedResourceRestoreMode: "string",
            noNamespaces: false,
            selectedApplications: {
                namespacedNames: [{
                    name: "string",
                    namespace: "string",
                }],
            },
            selectedNamespaces: {
                namespaces: ["string"],
            },
            transformationRules: [{
                fieldActions: [{
                    op: "string",
                    fromPath: "string",
                    path: "string",
                    value: "string",
                }],
                description: "string",
                resourceFilter: {
                    groupKinds: [{
                        resourceGroup: "string",
                        resourceKind: "string",
                    }],
                    jsonPath: "string",
                    namespaces: ["string"],
                },
            }],
            volumeDataRestorePolicy: "string",
        },
        description: "string",
        labels: {
            string: "string",
        },
        name: "string",
        project: "string",
    });
    
    type: gcp:gkebackup:RestorePlan
    properties:
        backupPlan: string
        cluster: string
        description: string
        labels:
            string: string
        location: string
        name: string
        project: string
        restoreConfig:
            allNamespaces: false
            clusterResourceConflictPolicy: string
            clusterResourceRestoreScope:
                allGroupKinds: false
                excludedGroupKinds:
                    - resourceGroup: string
                      resourceKind: string
                noGroupKinds: false
                selectedGroupKinds:
                    - resourceGroup: string
                      resourceKind: string
            excludedNamespaces:
                namespaces:
                    - string
            namespacedResourceRestoreMode: string
            noNamespaces: false
            selectedApplications:
                namespacedNames:
                    - name: string
                      namespace: string
            selectedNamespaces:
                namespaces:
                    - string
            transformationRules:
                - description: string
                  fieldActions:
                    - fromPath: string
                      op: string
                      path: string
                      value: string
                  resourceFilter:
                    groupKinds:
                        - resourceGroup: string
                          resourceKind: string
                    jsonPath: string
                    namespaces:
                        - string
            volumeDataRestorePolicy: string
    

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

    BackupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    Cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    Location string
    The region of the Restore Plan.
    RestoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    Description string
    User specified descriptive string for this RestorePlan.
    Labels Dictionary<string, string>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The full name of the BackupPlan Resource.
    Project string
    BackupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    Cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    Location string
    The region of the Restore Plan.
    RestoreConfig RestorePlanRestoreConfigArgs
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    Description string
    User specified descriptive string for this RestorePlan.
    Labels map[string]string
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Name string
    The full name of the BackupPlan Resource.
    Project string
    backupPlan String
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster String
    The source cluster from which Restores will be created via this RestorePlan.
    location String
    The region of the Restore Plan.
    restoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    description String
    User specified descriptive string for this RestorePlan.
    labels Map<String,String>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The full name of the BackupPlan Resource.
    project String
    backupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    location string
    The region of the Restore Plan.
    restoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    description string
    User specified descriptive string for this RestorePlan.
    labels {[key: string]: string}
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name string
    The full name of the BackupPlan Resource.
    project string
    backup_plan str
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster str
    The source cluster from which Restores will be created via this RestorePlan.
    location str
    The region of the Restore Plan.
    restore_config RestorePlanRestoreConfigArgs
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    description str
    User specified descriptive string for this RestorePlan.
    labels Mapping[str, str]
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name str
    The full name of the BackupPlan Resource.
    project str
    backupPlan String
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster String
    The source cluster from which Restores will be created via this RestorePlan.
    location String
    The region of the Restore Plan.
    restoreConfig Property Map
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    description String
    User specified descriptive string for this RestorePlan.
    labels Map<String>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    name String
    The full name of the BackupPlan Resource.
    project String

    Outputs

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

    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The State of the RestorePlan.
    StateReason string
    Detailed description of why RestorePlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The State of the RestorePlan.
    StateReason string
    Detailed description of why RestorePlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The State of the RestorePlan.
    stateReason String
    Detailed description of why RestorePlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state string
    The State of the RestorePlan.
    stateReason string
    Detailed description of why RestorePlan is in its current state.
    uid string
    Server generated, unique identifier of UUID format.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state str
    The State of the RestorePlan.
    state_reason str
    Detailed description of why RestorePlan is in its current state.
    uid str
    Server generated, unique identifier of UUID format.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The State of the RestorePlan.
    stateReason String
    Detailed description of why RestorePlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.

    Look up Existing RestorePlan Resource

    Get an existing RestorePlan 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?: RestorePlanState, opts?: CustomResourceOptions): RestorePlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_plan: Optional[str] = None,
            cluster: Optional[str] = None,
            description: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            restore_config: Optional[RestorePlanRestoreConfigArgs] = None,
            state: Optional[str] = None,
            state_reason: Optional[str] = None,
            uid: Optional[str] = None) -> RestorePlan
    func GetRestorePlan(ctx *Context, name string, id IDInput, state *RestorePlanState, opts ...ResourceOption) (*RestorePlan, error)
    public static RestorePlan Get(string name, Input<string> id, RestorePlanState? state, CustomResourceOptions? opts = null)
    public static RestorePlan get(String name, Output<String> id, RestorePlanState 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:
    BackupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    Cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    Description string
    User specified descriptive string for this RestorePlan.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Labels Dictionary<string, string>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Location string
    The region of the Restore Plan.
    Name string
    The full name of the BackupPlan Resource.
    Project string
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RestoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    State string
    The State of the RestorePlan.
    StateReason string
    Detailed description of why RestorePlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    BackupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    Cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    Description string
    User specified descriptive string for this RestorePlan.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Labels map[string]string
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    Location string
    The region of the Restore Plan.
    Name string
    The full name of the BackupPlan Resource.
    Project string
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RestoreConfig RestorePlanRestoreConfigArgs
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    State string
    The State of the RestorePlan.
    StateReason string
    Detailed description of why RestorePlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    backupPlan String
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster String
    The source cluster from which Restores will be created via this RestorePlan.
    description String
    User specified descriptive string for this RestorePlan.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Map<String,String>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    location String
    The region of the Restore Plan.
    name String
    The full name of the BackupPlan Resource.
    project String
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    restoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    state String
    The State of the RestorePlan.
    stateReason String
    Detailed description of why RestorePlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.
    backupPlan string
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster string
    The source cluster from which Restores will be created via this RestorePlan.
    description string
    User specified descriptive string for this RestorePlan.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels {[key: string]: string}
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    location string
    The region of the Restore Plan.
    name string
    The full name of the BackupPlan Resource.
    project string
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    restoreConfig RestorePlanRestoreConfig
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    state string
    The State of the RestorePlan.
    stateReason string
    Detailed description of why RestorePlan is in its current state.
    uid string
    Server generated, unique identifier of UUID format.
    backup_plan str
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster str
    The source cluster from which Restores will be created via this RestorePlan.
    description str
    User specified descriptive string for this RestorePlan.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Mapping[str, str]
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    location str
    The region of the Restore Plan.
    name str
    The full name of the BackupPlan Resource.
    project str
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    restore_config RestorePlanRestoreConfigArgs
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    state str
    The State of the RestorePlan.
    state_reason str
    Detailed description of why RestorePlan is in its current state.
    uid str
    Server generated, unique identifier of UUID format.
    backupPlan String
    A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
    cluster String
    The source cluster from which Restores will be created via this RestorePlan.
    description String
    User specified descriptive string for this RestorePlan.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    labels Map<String>
    Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
    location String
    The region of the Restore Plan.
    name String
    The full name of the BackupPlan Resource.
    project String
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    restoreConfig Property Map
    Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
    state String
    The State of the RestorePlan.
    stateReason String
    Detailed description of why RestorePlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.

    Supporting Types

    RestorePlanRestoreConfig, RestorePlanRestoreConfigArgs

    AllNamespaces bool
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    ClusterResourceConflictPolicy string
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    ClusterResourceRestoreScope RestorePlanRestoreConfigClusterResourceRestoreScope
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    ExcludedNamespaces RestorePlanRestoreConfigExcludedNamespaces
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    NamespacedResourceRestoreMode string
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    NoNamespaces bool
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    SelectedApplications RestorePlanRestoreConfigSelectedApplications
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    SelectedNamespaces RestorePlanRestoreConfigSelectedNamespaces
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    TransformationRules List<RestorePlanRestoreConfigTransformationRule>
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    VolumeDataRestorePolicy string
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.
    AllNamespaces bool
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    ClusterResourceConflictPolicy string
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    ClusterResourceRestoreScope RestorePlanRestoreConfigClusterResourceRestoreScope
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    ExcludedNamespaces RestorePlanRestoreConfigExcludedNamespaces
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    NamespacedResourceRestoreMode string
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    NoNamespaces bool
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    SelectedApplications RestorePlanRestoreConfigSelectedApplications
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    SelectedNamespaces RestorePlanRestoreConfigSelectedNamespaces
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    TransformationRules []RestorePlanRestoreConfigTransformationRule
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    VolumeDataRestorePolicy string
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.
    allNamespaces Boolean
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    clusterResourceConflictPolicy String
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    clusterResourceRestoreScope RestorePlanRestoreConfigClusterResourceRestoreScope
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    excludedNamespaces RestorePlanRestoreConfigExcludedNamespaces
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    namespacedResourceRestoreMode String
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    noNamespaces Boolean
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    selectedApplications RestorePlanRestoreConfigSelectedApplications
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    selectedNamespaces RestorePlanRestoreConfigSelectedNamespaces
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    transformationRules List<RestorePlanRestoreConfigTransformationRule>
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    volumeDataRestorePolicy String
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.
    allNamespaces boolean
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    clusterResourceConflictPolicy string
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    clusterResourceRestoreScope RestorePlanRestoreConfigClusterResourceRestoreScope
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    excludedNamespaces RestorePlanRestoreConfigExcludedNamespaces
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    namespacedResourceRestoreMode string
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    noNamespaces boolean
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    selectedApplications RestorePlanRestoreConfigSelectedApplications
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    selectedNamespaces RestorePlanRestoreConfigSelectedNamespaces
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    transformationRules RestorePlanRestoreConfigTransformationRule[]
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    volumeDataRestorePolicy string
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.
    all_namespaces bool
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    cluster_resource_conflict_policy str
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    cluster_resource_restore_scope RestorePlanRestoreConfigClusterResourceRestoreScope
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    excluded_namespaces RestorePlanRestoreConfigExcludedNamespaces
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    namespaced_resource_restore_mode str
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    no_namespaces bool
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    selected_applications RestorePlanRestoreConfigSelectedApplications
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    selected_namespaces RestorePlanRestoreConfigSelectedNamespaces
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    transformation_rules Sequence[RestorePlanRestoreConfigTransformationRule]
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    volume_data_restore_policy str
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.
    allNamespaces Boolean
    If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
    clusterResourceConflictPolicy String
    Defines the behavior for handling the situation where cluster-scoped resources being restored already exist in the target cluster. This MUST be set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if clusterResourceRestoreScope is anyting other than noGroupKinds. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are: USE_EXISTING_VERSION, USE_BACKUP_VERSION.
    clusterResourceRestoreScope Property Map
    Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
    excludedNamespaces Property Map
    A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
    namespacedResourceRestoreMode String
    Defines the behavior for handling the situation where sets of namespaced resources being restored already exist in the target cluster. This MUST be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are: DELETE_AND_RESTORE, FAIL_ON_CONFLICT.
    noNamespaces Boolean
    Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
    selectedApplications Property Map
    A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
    selectedNamespaces Property Map
    A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
    transformationRules List<Property Map>
    A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
    volumeDataRestorePolicy String
    Specifies the mechanism to be used to restore volume data. This should be set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED if the namespacedResourceRestoreScope is anything other than noNamespaces. If not specified, it will be treated as NO_VOLUME_DATA_RESTORATION. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are: RESTORE_VOLUME_DATA_FROM_BACKUP, REUSE_VOLUME_HANDLE_FROM_BACKUP, NO_VOLUME_DATA_RESTORATION.

    RestorePlanRestoreConfigClusterResourceRestoreScope, RestorePlanRestoreConfigClusterResourceRestoreScopeArgs

    AllGroupKinds bool
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    ExcludedGroupKinds List<RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind>
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    NoGroupKinds bool
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    SelectedGroupKinds List<RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind>
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.
    AllGroupKinds bool
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    ExcludedGroupKinds []RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    NoGroupKinds bool
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    SelectedGroupKinds []RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.
    allGroupKinds Boolean
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    excludedGroupKinds List<RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind>
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    noGroupKinds Boolean
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    selectedGroupKinds List<RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind>
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.
    allGroupKinds boolean
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    excludedGroupKinds RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind[]
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    noGroupKinds boolean
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    selectedGroupKinds RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind[]
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.
    all_group_kinds bool
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    excluded_group_kinds Sequence[RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind]
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    no_group_kinds bool
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    selected_group_kinds Sequence[RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind]
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.
    allGroupKinds Boolean
    If True, all valid cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    excludedGroupKinds List<Property Map>
    A list of cluster-scoped resource group kinds to NOT restore from the backup. If specified, all valid cluster-scoped resources will be restored except for those specified in the list. Mutually exclusive to any other field in clusterResourceRestoreScope. Structure is documented below.
    noGroupKinds Boolean
    If True, no cluster-scoped resources will be restored. Mutually exclusive to any other field in clusterResourceRestoreScope.
    selectedGroupKinds List<Property Map>
    A list of cluster-scoped resource group kinds to restore from the backup. If specified, only the selected resources will be restored. Mutually exclusive to any other field in the clusterResourceRestoreScope. Structure is documented below.

    RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind, RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs

    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resource_group str
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resource_kind str
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.

    RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind, RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs

    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resource_group str
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resource_kind str
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.

    RestorePlanRestoreConfigExcludedNamespaces, RestorePlanRestoreConfigExcludedNamespacesArgs

    Namespaces List<string>
    A list of Kubernetes Namespaces.
    Namespaces []string
    A list of Kubernetes Namespaces.
    namespaces List<String>
    A list of Kubernetes Namespaces.
    namespaces string[]
    A list of Kubernetes Namespaces.
    namespaces Sequence[str]
    A list of Kubernetes Namespaces.
    namespaces List<String>
    A list of Kubernetes Namespaces.

    RestorePlanRestoreConfigSelectedApplications, RestorePlanRestoreConfigSelectedApplicationsArgs

    NamespacedNames List<RestorePlanRestoreConfigSelectedApplicationsNamespacedName>
    A list of namespaced Kubernetes resources. Structure is documented below.
    NamespacedNames []RestorePlanRestoreConfigSelectedApplicationsNamespacedName
    A list of namespaced Kubernetes resources. Structure is documented below.
    namespacedNames List<RestorePlanRestoreConfigSelectedApplicationsNamespacedName>
    A list of namespaced Kubernetes resources. Structure is documented below.
    namespacedNames RestorePlanRestoreConfigSelectedApplicationsNamespacedName[]
    A list of namespaced Kubernetes resources. Structure is documented below.
    namespaced_names Sequence[RestorePlanRestoreConfigSelectedApplicationsNamespacedName]
    A list of namespaced Kubernetes resources. Structure is documented below.
    namespacedNames List<Property Map>
    A list of namespaced Kubernetes resources. Structure is documented below.

    RestorePlanRestoreConfigSelectedApplicationsNamespacedName, RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs

    Name string
    The name of a Kubernetes Resource.
    Namespace string
    The namespace of a Kubernetes Resource.
    Name string
    The name of a Kubernetes Resource.
    Namespace string
    The namespace of a Kubernetes Resource.
    name String
    The name of a Kubernetes Resource.
    namespace String
    The namespace of a Kubernetes Resource.
    name string
    The name of a Kubernetes Resource.
    namespace string
    The namespace of a Kubernetes Resource.
    name str
    The name of a Kubernetes Resource.
    namespace str
    The namespace of a Kubernetes Resource.
    name String
    The name of a Kubernetes Resource.
    namespace String
    The namespace of a Kubernetes Resource.

    RestorePlanRestoreConfigSelectedNamespaces, RestorePlanRestoreConfigSelectedNamespacesArgs

    Namespaces List<string>
    A list of Kubernetes Namespaces.
    Namespaces []string
    A list of Kubernetes Namespaces.
    namespaces List<String>
    A list of Kubernetes Namespaces.
    namespaces string[]
    A list of Kubernetes Namespaces.
    namespaces Sequence[str]
    A list of Kubernetes Namespaces.
    namespaces List<String>
    A list of Kubernetes Namespaces.

    RestorePlanRestoreConfigTransformationRule, RestorePlanRestoreConfigTransformationRuleArgs

    FieldActions List<RestorePlanRestoreConfigTransformationRuleFieldAction>
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    Description string
    The description is a user specified string description of the transformation rule.
    ResourceFilter RestorePlanRestoreConfigTransformationRuleResourceFilter
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
    FieldActions []RestorePlanRestoreConfigTransformationRuleFieldAction
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    Description string
    The description is a user specified string description of the transformation rule.
    ResourceFilter RestorePlanRestoreConfigTransformationRuleResourceFilter
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
    fieldActions List<RestorePlanRestoreConfigTransformationRuleFieldAction>
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    description String
    The description is a user specified string description of the transformation rule.
    resourceFilter RestorePlanRestoreConfigTransformationRuleResourceFilter
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
    fieldActions RestorePlanRestoreConfigTransformationRuleFieldAction[]
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    description string
    The description is a user specified string description of the transformation rule.
    resourceFilter RestorePlanRestoreConfigTransformationRuleResourceFilter
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
    field_actions Sequence[RestorePlanRestoreConfigTransformationRuleFieldAction]
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    description str
    The description is a user specified string description of the transformation rule.
    resource_filter RestorePlanRestoreConfigTransformationRuleResourceFilter
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
    fieldActions List<Property Map>
    A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
    description String
    The description is a user specified string description of the transformation rule.
    resourceFilter Property Map
    This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.

    RestorePlanRestoreConfigTransformationRuleFieldAction, RestorePlanRestoreConfigTransformationRuleFieldActionArgs

    Op string
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    FromPath string
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    Path string
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    Value string
    A string that specifies the desired value in string format to use for transformation.


    Op string
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    FromPath string
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    Path string
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    Value string
    A string that specifies the desired value in string format to use for transformation.


    op String
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    fromPath String
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    path String
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    value String
    A string that specifies the desired value in string format to use for transformation.


    op string
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    fromPath string
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    path string
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    value string
    A string that specifies the desired value in string format to use for transformation.


    op str
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    from_path str
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    path str
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    value str
    A string that specifies the desired value in string format to use for transformation.


    op String
    Specifies the operation to perform. Possible values are: REMOVE, MOVE, COPY, ADD, TEST, REPLACE.
    fromPath String
    A string containing a JSON Pointer value that references the location in the target document to move the value from.
    path String
    A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
    value String
    A string that specifies the desired value in string format to use for transformation.


    RestorePlanRestoreConfigTransformationRuleResourceFilter, RestorePlanRestoreConfigTransformationRuleResourceFilterArgs

    GroupKinds List<RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind>
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    JsonPath string
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    Namespaces List<string>
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
    GroupKinds []RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    JsonPath string
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    Namespaces []string
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
    groupKinds List<RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind>
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    jsonPath String
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    namespaces List<String>
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
    groupKinds RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind[]
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    jsonPath string
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    namespaces string[]
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
    group_kinds Sequence[RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind]
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    json_path str
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    namespaces Sequence[str]
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
    groupKinds List<Property Map>
    (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
    jsonPath String
    This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
    namespaces List<String>
    (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.

    RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind, RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs

    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    ResourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    ResourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup string
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind string
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resource_group str
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resource_kind str
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
    resourceGroup String
    API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
    resourceKind String
    Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.

    Import

    RestorePlan can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/restorePlans/{{name}}

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

    • {{location}}/{{name}}

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

    $ pulumi import gcp:gkebackup/restorePlan:RestorePlan default projects/{{project}}/locations/{{location}}/restorePlans/{{name}}
    
    $ pulumi import gcp:gkebackup/restorePlan:RestorePlan default {{project}}/{{location}}/{{name}}
    
    $ pulumi import gcp:gkebackup/restorePlan:RestorePlan default {{location}}/{{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi