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

gcp.gkebackup.BackupPlan

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi

    Represents a Backup Plan instance.

    To get more information about BackupPlan, see:

    Example Usage

    Gkebackup Backupplan Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "basic-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: true,
        network: "default",
        subnetwork: "default",
    });
    const basic = new gcp.gkebackup.BackupPlan("basic", {
        name: "basic-plan",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="basic-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=True,
        network="default",
        subnetwork="default")
    basic = gcp.gkebackup.BackupPlan("basic",
        name="basic-plan",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=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("basic-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(true),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("basic-plan"),
    			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
    		}
    		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 = "basic-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 = true,
            Network = "default",
            Subnetwork = "default",
        });
    
        var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
        {
            Name = "basic-plan",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = 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 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("basic-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("true")
                .network("default")
                .subnetwork("default")
                .build());
    
            var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
                .name("basic-plan")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: basic-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection: 'true'
          network: default
          subnetwork: default
      basic:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: basic-plan
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
    

    Gkebackup Backupplan Autopilot

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "autopilot-cluster",
        location: "us-central1",
        enableAutopilot: true,
        ipAllocationPolicy: {},
        releaseChannel: {
            channel: "RAPID",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: true,
        network: "default",
        subnetwork: "default",
    });
    const autopilot = new gcp.gkebackup.BackupPlan("autopilot", {
        name: "autopilot-plan",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            allNamespaces: true,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="autopilot-cluster",
        location="us-central1",
        enable_autopilot=True,
        ip_allocation_policy=gcp.container.ClusterIpAllocationPolicyArgs(),
        release_channel=gcp.container.ClusterReleaseChannelArgs(
            channel="RAPID",
        ),
        addons_config=gcp.container.ClusterAddonsConfigArgs(
            gke_backup_agent_config=gcp.container.ClusterAddonsConfigGkeBackupAgentConfigArgs(
                enabled=True,
            ),
        ),
        deletion_protection=True,
        network="default",
        subnetwork="default")
    autopilot = gcp.gkebackup.BackupPlan("autopilot",
        name="autopilot-plan",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            all_namespaces=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("autopilot-cluster"),
    			Location:           pulumi.String("us-central1"),
    			EnableAutopilot:    pulumi.Bool(true),
    			IpAllocationPolicy: nil,
    			ReleaseChannel: &container.ClusterReleaseChannelArgs{
    				Channel: pulumi.String("RAPID"),
    			},
    			AddonsConfig: &container.ClusterAddonsConfigArgs{
    				GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			DeletionProtection: pulumi.Bool(true),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewBackupPlan(ctx, "autopilot", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("autopilot-plan"),
    			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
    		}
    		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 = "autopilot-cluster",
            Location = "us-central1",
            EnableAutopilot = true,
            IpAllocationPolicy = null,
            ReleaseChannel = new Gcp.Container.Inputs.ClusterReleaseChannelArgs
            {
                Channel = "RAPID",
            },
            AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
            {
                GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
                {
                    Enabled = true,
                },
            },
            DeletionProtection = true,
            Network = "default",
            Subnetwork = "default",
        });
    
        var autopilot = new Gcp.GkeBackup.BackupPlan("autopilot", new()
        {
            Name = "autopilot-plan",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                AllNamespaces = 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.ClusterIpAllocationPolicyArgs;
    import com.pulumi.gcp.container.inputs.ClusterReleaseChannelArgs;
    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 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("autopilot-cluster")
                .location("us-central1")
                .enableAutopilot(true)
                .ipAllocationPolicy()
                .releaseChannel(ClusterReleaseChannelArgs.builder()
                    .channel("RAPID")
                    .build())
                .addonsConfig(ClusterAddonsConfigArgs.builder()
                    .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .deletionProtection("true")
                .network("default")
                .subnetwork("default")
                .build());
    
            var autopilot = new BackupPlan("autopilot", BackupPlanArgs.builder()        
                .name("autopilot-plan")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .allNamespaces(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: autopilot-cluster
          location: us-central1
          enableAutopilot: true
          ipAllocationPolicy: {}
          releaseChannel:
            channel: RAPID
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection: 'true'
          network: default
          subnetwork: default
      autopilot:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: autopilot-plan
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            allNamespaces: true
    

    Gkebackup Backupplan Cmek

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "cmek-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: true,
        network: "default",
        subnetwork: "default",
    });
    const keyRing = new gcp.kms.KeyRing("key_ring", {
        name: "backup-key",
        location: "us-central1",
    });
    const cryptoKey = new gcp.kms.CryptoKey("crypto_key", {
        name: "backup-key",
        keyRing: keyRing.id,
    });
    const cmek = new gcp.gkebackup.BackupPlan("cmek", {
        name: "cmek-plan",
        cluster: primary.id,
        location: "us-central1",
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            selectedNamespaces: {
                namespaces: [
                    "default",
                    "test",
                ],
            },
            encryptionKey: {
                gcpKmsEncryptionKey: cryptoKey.id,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="cmek-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=True,
        network="default",
        subnetwork="default")
    key_ring = gcp.kms.KeyRing("key_ring",
        name="backup-key",
        location="us-central1")
    crypto_key = gcp.kms.CryptoKey("crypto_key",
        name="backup-key",
        key_ring=key_ring.id)
    cmek = gcp.gkebackup.BackupPlan("cmek",
        name="cmek-plan",
        cluster=primary.id,
        location="us-central1",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            selected_namespaces=gcp.gkebackup.BackupPlanBackupConfigSelectedNamespacesArgs(
                namespaces=[
                    "default",
                    "test",
                ],
            ),
            encryption_key=gcp.gkebackup.BackupPlanBackupConfigEncryptionKeyArgs(
                gcp_kms_encryption_key=crypto_key.id,
            ),
        ))
    
    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-gcp/sdk/v7/go/gcp/kms"
    	"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("cmek-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(true),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		keyRing, err := kms.NewKeyRing(ctx, "key_ring", &kms.KeyRingArgs{
    			Name:     pulumi.String("backup-key"),
    			Location: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		cryptoKey, err := kms.NewCryptoKey(ctx, "crypto_key", &kms.CryptoKeyArgs{
    			Name:    pulumi.String("backup-key"),
    			KeyRing: keyRing.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewBackupPlan(ctx, "cmek", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("cmek-plan"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				SelectedNamespaces: &gkebackup.BackupPlanBackupConfigSelectedNamespacesArgs{
    					Namespaces: pulumi.StringArray{
    						pulumi.String("default"),
    						pulumi.String("test"),
    					},
    				},
    				EncryptionKey: &gkebackup.BackupPlanBackupConfigEncryptionKeyArgs{
    					GcpKmsEncryptionKey: cryptoKey.ID(),
    				},
    			},
    		})
    		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 = "cmek-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 = true,
            Network = "default",
            Subnetwork = "default",
        });
    
        var keyRing = new Gcp.Kms.KeyRing("key_ring", new()
        {
            Name = "backup-key",
            Location = "us-central1",
        });
    
        var cryptoKey = new Gcp.Kms.CryptoKey("crypto_key", new()
        {
            Name = "backup-key",
            KeyRing = keyRing.Id,
        });
    
        var cmek = new Gcp.GkeBackup.BackupPlan("cmek", new()
        {
            Name = "cmek-plan",
            Cluster = primary.Id,
            Location = "us-central1",
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                SelectedNamespaces = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedNamespacesArgs
                {
                    Namespaces = new[]
                    {
                        "default",
                        "test",
                    },
                },
                EncryptionKey = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigEncryptionKeyArgs
                {
                    GcpKmsEncryptionKey = cryptoKey.Id,
                },
            },
        });
    
    });
    
    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.kms.KeyRing;
    import com.pulumi.gcp.kms.KeyRingArgs;
    import com.pulumi.gcp.kms.CryptoKey;
    import com.pulumi.gcp.kms.CryptoKeyArgs;
    import com.pulumi.gcp.gkebackup.BackupPlan;
    import com.pulumi.gcp.gkebackup.BackupPlanArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigSelectedNamespacesArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigEncryptionKeyArgs;
    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("cmek-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("true")
                .network("default")
                .subnetwork("default")
                .build());
    
            var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()        
                .name("backup-key")
                .location("us-central1")
                .build());
    
            var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()        
                .name("backup-key")
                .keyRing(keyRing.id())
                .build());
    
            var cmek = new BackupPlan("cmek", BackupPlanArgs.builder()        
                .name("cmek-plan")
                .cluster(primary.id())
                .location("us-central1")
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .selectedNamespaces(BackupPlanBackupConfigSelectedNamespacesArgs.builder()
                        .namespaces(                    
                            "default",
                            "test")
                        .build())
                    .encryptionKey(BackupPlanBackupConfigEncryptionKeyArgs.builder()
                        .gcpKmsEncryptionKey(cryptoKey.id())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: cmek-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection: 'true'
          network: default
          subnetwork: default
      cmek:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: cmek-plan
          cluster: ${primary.id}
          location: us-central1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            selectedNamespaces:
              namespaces:
                - default
                - test
            encryptionKey:
              gcpKmsEncryptionKey: ${cryptoKey.id}
      cryptoKey:
        type: gcp:kms:CryptoKey
        name: crypto_key
        properties:
          name: backup-key
          keyRing: ${keyRing.id}
      keyRing:
        type: gcp:kms:KeyRing
        name: key_ring
        properties:
          name: backup-key
          location: us-central1
    

    Gkebackup Backupplan Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const primary = new gcp.container.Cluster("primary", {
        name: "full-cluster",
        location: "us-central1",
        initialNodeCount: 1,
        workloadIdentityConfig: {
            workloadPool: "my-project-name.svc.id.goog",
        },
        addonsConfig: {
            gkeBackupAgentConfig: {
                enabled: true,
            },
        },
        deletionProtection: true,
        network: "default",
        subnetwork: "default",
    });
    const full = new gcp.gkebackup.BackupPlan("full", {
        name: "full-plan",
        cluster: primary.id,
        location: "us-central1",
        retentionPolicy: {
            backupDeleteLockDays: 30,
            backupRetainDays: 180,
        },
        backupSchedule: {
            cronSchedule: "0 9 * * 1",
        },
        backupConfig: {
            includeVolumeData: true,
            includeSecrets: true,
            selectedApplications: {
                namespacedNames: [
                    {
                        name: "app1",
                        namespace: "ns1",
                    },
                    {
                        name: "app2",
                        namespace: "ns2",
                    },
                ],
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    primary = gcp.container.Cluster("primary",
        name="full-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=True,
        network="default",
        subnetwork="default")
    full = gcp.gkebackup.BackupPlan("full",
        name="full-plan",
        cluster=primary.id,
        location="us-central1",
        retention_policy=gcp.gkebackup.BackupPlanRetentionPolicyArgs(
            backup_delete_lock_days=30,
            backup_retain_days=180,
        ),
        backup_schedule=gcp.gkebackup.BackupPlanBackupScheduleArgs(
            cron_schedule="0 9 * * 1",
        ),
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            include_volume_data=True,
            include_secrets=True,
            selected_applications=gcp.gkebackup.BackupPlanBackupConfigSelectedApplicationsArgs(
                namespaced_names=[
                    gcp.gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs(
                        name="app1",
                        namespace="ns1",
                    ),
                    gcp.gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs(
                        name="app2",
                        namespace="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("full-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(true),
    			Network:            pulumi.String("default"),
    			Subnetwork:         pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gkebackup.NewBackupPlan(ctx, "full", &gkebackup.BackupPlanArgs{
    			Name:     pulumi.String("full-plan"),
    			Cluster:  primary.ID(),
    			Location: pulumi.String("us-central1"),
    			RetentionPolicy: &gkebackup.BackupPlanRetentionPolicyArgs{
    				BackupDeleteLockDays: pulumi.Int(30),
    				BackupRetainDays:     pulumi.Int(180),
    			},
    			BackupSchedule: &gkebackup.BackupPlanBackupScheduleArgs{
    				CronSchedule: pulumi.String("0 9 * * 1"),
    			},
    			BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    				IncludeVolumeData: pulumi.Bool(true),
    				IncludeSecrets:    pulumi.Bool(true),
    				SelectedApplications: &gkebackup.BackupPlanBackupConfigSelectedApplicationsArgs{
    					NamespacedNames: gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArray{
    						&gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs{
    							Name:      pulumi.String("app1"),
    							Namespace: pulumi.String("ns1"),
    						},
    						&gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs{
    							Name:      pulumi.String("app2"),
    							Namespace: 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 = "full-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 = true,
            Network = "default",
            Subnetwork = "default",
        });
    
        var full = new Gcp.GkeBackup.BackupPlan("full", new()
        {
            Name = "full-plan",
            Cluster = primary.Id,
            Location = "us-central1",
            RetentionPolicy = new Gcp.GkeBackup.Inputs.BackupPlanRetentionPolicyArgs
            {
                BackupDeleteLockDays = 30,
                BackupRetainDays = 180,
            },
            BackupSchedule = new Gcp.GkeBackup.Inputs.BackupPlanBackupScheduleArgs
            {
                CronSchedule = "0 9 * * 1",
            },
            BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
            {
                IncludeVolumeData = true,
                IncludeSecrets = true,
                SelectedApplications = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedApplicationsArgs
                {
                    NamespacedNames = new[]
                    {
                        new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs
                        {
                            Name = "app1",
                            Namespace = "ns1",
                        },
                        new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs
                        {
                            Name = "app2",
                            Namespace = "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.BackupPlanRetentionPolicyArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupScheduleArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
    import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigSelectedApplicationsArgs;
    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("full-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("true")
                .network("default")
                .subnetwork("default")
                .build());
    
            var full = new BackupPlan("full", BackupPlanArgs.builder()        
                .name("full-plan")
                .cluster(primary.id())
                .location("us-central1")
                .retentionPolicy(BackupPlanRetentionPolicyArgs.builder()
                    .backupDeleteLockDays(30)
                    .backupRetainDays(180)
                    .build())
                .backupSchedule(BackupPlanBackupScheduleArgs.builder()
                    .cronSchedule("0 9 * * 1")
                    .build())
                .backupConfig(BackupPlanBackupConfigArgs.builder()
                    .includeVolumeData(true)
                    .includeSecrets(true)
                    .selectedApplications(BackupPlanBackupConfigSelectedApplicationsArgs.builder()
                        .namespacedNames(                    
                            BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs.builder()
                                .name("app1")
                                .namespace("ns1")
                                .build(),
                            BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs.builder()
                                .name("app2")
                                .namespace("ns2")
                                .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      primary:
        type: gcp:container:Cluster
        properties:
          name: full-cluster
          location: us-central1
          initialNodeCount: 1
          workloadIdentityConfig:
            workloadPool: my-project-name.svc.id.goog
          addonsConfig:
            gkeBackupAgentConfig:
              enabled: true
          deletionProtection: 'true'
          network: default
          subnetwork: default
      full:
        type: gcp:gkebackup:BackupPlan
        properties:
          name: full-plan
          cluster: ${primary.id}
          location: us-central1
          retentionPolicy:
            backupDeleteLockDays: 30
            backupRetainDays: 180
          backupSchedule:
            cronSchedule: 0 9 * * 1
          backupConfig:
            includeVolumeData: true
            includeSecrets: true
            selectedApplications:
              namespacedNames:
                - name: app1
                  namespace: ns1
                - name: app2
                  namespace: ns2
    

    Create BackupPlan Resource

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

    Constructor syntax

    new BackupPlan(name: string, args: BackupPlanArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPlan(resource_name: str,
                   args: BackupPlanArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPlan(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   cluster: Optional[str] = None,
                   location: Optional[str] = None,
                   backup_config: Optional[BackupPlanBackupConfigArgs] = None,
                   backup_schedule: Optional[BackupPlanBackupScheduleArgs] = None,
                   deactivated: Optional[bool] = None,
                   description: Optional[str] = None,
                   labels: Optional[Mapping[str, str]] = None,
                   name: Optional[str] = None,
                   project: Optional[str] = None,
                   retention_policy: Optional[BackupPlanRetentionPolicyArgs] = None)
    func NewBackupPlan(ctx *Context, name string, args BackupPlanArgs, opts ...ResourceOption) (*BackupPlan, error)
    public BackupPlan(string name, BackupPlanArgs args, CustomResourceOptions? opts = null)
    public BackupPlan(String name, BackupPlanArgs args)
    public BackupPlan(String name, BackupPlanArgs args, CustomResourceOptions options)
    
    type: gcp:gkebackup:BackupPlan
    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 BackupPlanArgs
    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 BackupPlanArgs
    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 BackupPlanArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPlanArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPlanArgs
    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 backupPlanResource = new Gcp.GkeBackup.BackupPlan("backupPlanResource", new()
    {
        Cluster = "string",
        Location = "string",
        BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
        {
            AllNamespaces = false,
            EncryptionKey = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigEncryptionKeyArgs
            {
                GcpKmsEncryptionKey = "string",
            },
            IncludeSecrets = false,
            IncludeVolumeData = false,
            SelectedApplications = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedApplicationsArgs
            {
                NamespacedNames = new[]
                {
                    new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs
                    {
                        Name = "string",
                        Namespace = "string",
                    },
                },
            },
            SelectedNamespaces = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigSelectedNamespacesArgs
            {
                Namespaces = new[]
                {
                    "string",
                },
            },
        },
        BackupSchedule = new Gcp.GkeBackup.Inputs.BackupPlanBackupScheduleArgs
        {
            CronSchedule = "string",
            Paused = false,
        },
        Deactivated = false,
        Description = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Project = "string",
        RetentionPolicy = new Gcp.GkeBackup.Inputs.BackupPlanRetentionPolicyArgs
        {
            BackupDeleteLockDays = 0,
            BackupRetainDays = 0,
            Locked = false,
        },
    });
    
    example, err := gkebackup.NewBackupPlan(ctx, "backupPlanResource", &gkebackup.BackupPlanArgs{
    	Cluster:  pulumi.String("string"),
    	Location: pulumi.String("string"),
    	BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
    		AllNamespaces: pulumi.Bool(false),
    		EncryptionKey: &gkebackup.BackupPlanBackupConfigEncryptionKeyArgs{
    			GcpKmsEncryptionKey: pulumi.String("string"),
    		},
    		IncludeSecrets:    pulumi.Bool(false),
    		IncludeVolumeData: pulumi.Bool(false),
    		SelectedApplications: &gkebackup.BackupPlanBackupConfigSelectedApplicationsArgs{
    			NamespacedNames: gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArray{
    				&gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs{
    					Name:      pulumi.String("string"),
    					Namespace: pulumi.String("string"),
    				},
    			},
    		},
    		SelectedNamespaces: &gkebackup.BackupPlanBackupConfigSelectedNamespacesArgs{
    			Namespaces: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	BackupSchedule: &gkebackup.BackupPlanBackupScheduleArgs{
    		CronSchedule: pulumi.String("string"),
    		Paused:       pulumi.Bool(false),
    	},
    	Deactivated: pulumi.Bool(false),
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Project: pulumi.String("string"),
    	RetentionPolicy: &gkebackup.BackupPlanRetentionPolicyArgs{
    		BackupDeleteLockDays: pulumi.Int(0),
    		BackupRetainDays:     pulumi.Int(0),
    		Locked:               pulumi.Bool(false),
    	},
    })
    
    var backupPlanResource = new BackupPlan("backupPlanResource", BackupPlanArgs.builder()        
        .cluster("string")
        .location("string")
        .backupConfig(BackupPlanBackupConfigArgs.builder()
            .allNamespaces(false)
            .encryptionKey(BackupPlanBackupConfigEncryptionKeyArgs.builder()
                .gcpKmsEncryptionKey("string")
                .build())
            .includeSecrets(false)
            .includeVolumeData(false)
            .selectedApplications(BackupPlanBackupConfigSelectedApplicationsArgs.builder()
                .namespacedNames(BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs.builder()
                    .name("string")
                    .namespace("string")
                    .build())
                .build())
            .selectedNamespaces(BackupPlanBackupConfigSelectedNamespacesArgs.builder()
                .namespaces("string")
                .build())
            .build())
        .backupSchedule(BackupPlanBackupScheduleArgs.builder()
            .cronSchedule("string")
            .paused(false)
            .build())
        .deactivated(false)
        .description("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .project("string")
        .retentionPolicy(BackupPlanRetentionPolicyArgs.builder()
            .backupDeleteLockDays(0)
            .backupRetainDays(0)
            .locked(false)
            .build())
        .build());
    
    backup_plan_resource = gcp.gkebackup.BackupPlan("backupPlanResource",
        cluster="string",
        location="string",
        backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
            all_namespaces=False,
            encryption_key=gcp.gkebackup.BackupPlanBackupConfigEncryptionKeyArgs(
                gcp_kms_encryption_key="string",
            ),
            include_secrets=False,
            include_volume_data=False,
            selected_applications=gcp.gkebackup.BackupPlanBackupConfigSelectedApplicationsArgs(
                namespaced_names=[gcp.gkebackup.BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs(
                    name="string",
                    namespace="string",
                )],
            ),
            selected_namespaces=gcp.gkebackup.BackupPlanBackupConfigSelectedNamespacesArgs(
                namespaces=["string"],
            ),
        ),
        backup_schedule=gcp.gkebackup.BackupPlanBackupScheduleArgs(
            cron_schedule="string",
            paused=False,
        ),
        deactivated=False,
        description="string",
        labels={
            "string": "string",
        },
        name="string",
        project="string",
        retention_policy=gcp.gkebackup.BackupPlanRetentionPolicyArgs(
            backup_delete_lock_days=0,
            backup_retain_days=0,
            locked=False,
        ))
    
    const backupPlanResource = new gcp.gkebackup.BackupPlan("backupPlanResource", {
        cluster: "string",
        location: "string",
        backupConfig: {
            allNamespaces: false,
            encryptionKey: {
                gcpKmsEncryptionKey: "string",
            },
            includeSecrets: false,
            includeVolumeData: false,
            selectedApplications: {
                namespacedNames: [{
                    name: "string",
                    namespace: "string",
                }],
            },
            selectedNamespaces: {
                namespaces: ["string"],
            },
        },
        backupSchedule: {
            cronSchedule: "string",
            paused: false,
        },
        deactivated: false,
        description: "string",
        labels: {
            string: "string",
        },
        name: "string",
        project: "string",
        retentionPolicy: {
            backupDeleteLockDays: 0,
            backupRetainDays: 0,
            locked: false,
        },
    });
    
    type: gcp:gkebackup:BackupPlan
    properties:
        backupConfig:
            allNamespaces: false
            encryptionKey:
                gcpKmsEncryptionKey: string
            includeSecrets: false
            includeVolumeData: false
            selectedApplications:
                namespacedNames:
                    - name: string
                      namespace: string
            selectedNamespaces:
                namespaces:
                    - string
        backupSchedule:
            cronSchedule: string
            paused: false
        cluster: string
        deactivated: false
        description: string
        labels:
            string: string
        location: string
        name: string
        project: string
        retentionPolicy:
            backupDeleteLockDays: 0
            backupRetainDays: 0
            locked: false
    

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

    Cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    Location string
    The region of the Backup Plan.


    BackupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    BackupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    Deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    Description string
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RetentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    Cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    Location string
    The region of the Backup Plan.


    BackupConfig BackupPlanBackupConfigArgs
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    BackupSchedule BackupPlanBackupScheduleArgs
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    Deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    Description string
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RetentionPolicy BackupPlanRetentionPolicyArgs
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    cluster String
    The source cluster from which Backups will be created via this BackupPlan.
    location String
    The region of the Backup Plan.


    backupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    deactivated Boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description String
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    retentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    location string
    The region of the Backup Plan.


    backupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    deactivated boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description string
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    retentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    cluster str
    The source cluster from which Backups will be created via this BackupPlan.
    location str
    The region of the Backup Plan.


    backup_config BackupPlanBackupConfigArgs
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backup_schedule BackupPlanBackupScheduleArgs
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description str
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    retention_policy BackupPlanRetentionPolicyArgs
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    cluster String
    The source cluster from which Backups will be created via this BackupPlan.
    location String
    The region of the Backup Plan.


    backupConfig Property Map
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule Property Map
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    deactivated Boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description String
    User specified descriptive string for this BackupPlan.
    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
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    retentionPolicy Property Map
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BackupPlan 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.
    Etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProtectedPodCount int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    StateReason string
    Detailed description of why BackupPlan 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.
    Etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProtectedPodCount int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    StateReason string
    Detailed description of why BackupPlan 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.
    etag String
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    protectedPodCount Integer
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    stateReason String
    Detailed description of why BackupPlan 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.
    etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    protectedPodCount number
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    stateReason string
    Detailed description of why BackupPlan 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.
    etag str
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    protected_pod_count int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    state_reason str
    Detailed description of why BackupPlan 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.
    etag String
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    protectedPodCount Number
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    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 BackupPlan.
    stateReason String
    Detailed description of why BackupPlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.

    Look up Existing BackupPlan Resource

    Get an existing BackupPlan 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?: BackupPlanState, opts?: CustomResourceOptions): BackupPlan
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_config: Optional[BackupPlanBackupConfigArgs] = None,
            backup_schedule: Optional[BackupPlanBackupScheduleArgs] = None,
            cluster: Optional[str] = None,
            deactivated: Optional[bool] = None,
            description: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            etag: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            protected_pod_count: Optional[int] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            retention_policy: Optional[BackupPlanRetentionPolicyArgs] = None,
            state: Optional[str] = None,
            state_reason: Optional[str] = None,
            uid: Optional[str] = None) -> BackupPlan
    func GetBackupPlan(ctx *Context, name string, id IDInput, state *BackupPlanState, opts ...ResourceOption) (*BackupPlan, error)
    public static BackupPlan Get(string name, Input<string> id, BackupPlanState? state, CustomResourceOptions? opts = null)
    public static BackupPlan get(String name, Output<String> id, BackupPlanState 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:
    BackupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    BackupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    Cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    Deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    Description string
    User specified descriptive string for this BackupPlan.
    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.
    Etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    Name string
    The full name of the BackupPlan Resource.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ProtectedPodCount int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RetentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    State string
    The State of the BackupPlan.
    StateReason string
    Detailed description of why BackupPlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    BackupConfig BackupPlanBackupConfigArgs
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    BackupSchedule BackupPlanBackupScheduleArgs
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    Cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    Deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    Description string
    User specified descriptive string for this BackupPlan.
    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.
    Etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    Name string
    The full name of the BackupPlan Resource.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ProtectedPodCount int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    RetentionPolicy BackupPlanRetentionPolicyArgs
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    State string
    The State of the BackupPlan.
    StateReason string
    Detailed description of why BackupPlan is in its current state.
    Uid string
    Server generated, unique identifier of UUID format.
    backupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    cluster String
    The source cluster from which Backups will be created via this BackupPlan.
    deactivated Boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description String
    User specified descriptive string for this BackupPlan.
    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.
    etag String
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    name String
    The full name of the BackupPlan Resource.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    protectedPodCount Integer
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    retentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    state String
    The State of the BackupPlan.
    stateReason String
    Detailed description of why BackupPlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.
    backupConfig BackupPlanBackupConfig
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule BackupPlanBackupSchedule
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    cluster string
    The source cluster from which Backups will be created via this BackupPlan.
    deactivated boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description string
    User specified descriptive string for this BackupPlan.
    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.
    etag string
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    name string
    The full name of the BackupPlan Resource.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    protectedPodCount number
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    retentionPolicy BackupPlanRetentionPolicy
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    state string
    The State of the BackupPlan.
    stateReason string
    Detailed description of why BackupPlan is in its current state.
    uid string
    Server generated, unique identifier of UUID format.
    backup_config BackupPlanBackupConfigArgs
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backup_schedule BackupPlanBackupScheduleArgs
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    cluster str
    The source cluster from which Backups will be created via this BackupPlan.
    deactivated bool
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description str
    User specified descriptive string for this BackupPlan.
    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.
    etag str
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    name str
    The full name of the BackupPlan Resource.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    protected_pod_count int
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    retention_policy BackupPlanRetentionPolicyArgs
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    state str
    The State of the BackupPlan.
    state_reason str
    Detailed description of why BackupPlan is in its current state.
    uid str
    Server generated, unique identifier of UUID format.
    backupConfig Property Map
    Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
    backupSchedule Property Map
    Defines a schedule for automatic Backup creation via this BackupPlan. Structure is documented below.
    cluster String
    The source cluster from which Backups will be created via this BackupPlan.
    deactivated Boolean
    This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).
    description String
    User specified descriptive string for this BackupPlan.
    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.
    etag String
    etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An etag is returned in the response to backupPlans.get, and systems are expected to put that etag in the request to backupPlans.patch or backupPlans.delete to ensure that their change will be applied to the same version of the resource.
    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 Backup Plan.


    name String
    The full name of the BackupPlan Resource.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    protectedPodCount Number
    The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    retentionPolicy Property Map
    RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
    state String
    The State of the BackupPlan.
    stateReason String
    Detailed description of why BackupPlan is in its current state.
    uid String
    Server generated, unique identifier of UUID format.

    Supporting Types

    BackupPlanBackupConfig, BackupPlanBackupConfigArgs

    AllNamespaces bool
    If True, include all namespaced resources.
    EncryptionKey BackupPlanBackupConfigEncryptionKey
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    IncludeSecrets bool
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    IncludeVolumeData bool
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    SelectedApplications BackupPlanBackupConfigSelectedApplications
    A list of namespaced Kubernetes Resources. Structure is documented below.
    SelectedNamespaces BackupPlanBackupConfigSelectedNamespaces
    If set, include just the resources in the listed namespaces. Structure is documented below.
    AllNamespaces bool
    If True, include all namespaced resources.
    EncryptionKey BackupPlanBackupConfigEncryptionKey
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    IncludeSecrets bool
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    IncludeVolumeData bool
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    SelectedApplications BackupPlanBackupConfigSelectedApplications
    A list of namespaced Kubernetes Resources. Structure is documented below.
    SelectedNamespaces BackupPlanBackupConfigSelectedNamespaces
    If set, include just the resources in the listed namespaces. Structure is documented below.
    allNamespaces Boolean
    If True, include all namespaced resources.
    encryptionKey BackupPlanBackupConfigEncryptionKey
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    includeSecrets Boolean
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    includeVolumeData Boolean
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    selectedApplications BackupPlanBackupConfigSelectedApplications
    A list of namespaced Kubernetes Resources. Structure is documented below.
    selectedNamespaces BackupPlanBackupConfigSelectedNamespaces
    If set, include just the resources in the listed namespaces. Structure is documented below.
    allNamespaces boolean
    If True, include all namespaced resources.
    encryptionKey BackupPlanBackupConfigEncryptionKey
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    includeSecrets boolean
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    includeVolumeData boolean
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    selectedApplications BackupPlanBackupConfigSelectedApplications
    A list of namespaced Kubernetes Resources. Structure is documented below.
    selectedNamespaces BackupPlanBackupConfigSelectedNamespaces
    If set, include just the resources in the listed namespaces. Structure is documented below.
    all_namespaces bool
    If True, include all namespaced resources.
    encryption_key BackupPlanBackupConfigEncryptionKey
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    include_secrets bool
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    include_volume_data bool
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    selected_applications BackupPlanBackupConfigSelectedApplications
    A list of namespaced Kubernetes Resources. Structure is documented below.
    selected_namespaces BackupPlanBackupConfigSelectedNamespaces
    If set, include just the resources in the listed namespaces. Structure is documented below.
    allNamespaces Boolean
    If True, include all namespaced resources.
    encryptionKey Property Map
    This defines a customer managed encryption key that will be used to encrypt the "config" portion (the Kubernetes resources) of Backups created via this plan. Structure is documented below.
    includeSecrets Boolean
    This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
    includeVolumeData Boolean
    This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
    selectedApplications Property Map
    A list of namespaced Kubernetes Resources. Structure is documented below.
    selectedNamespaces Property Map
    If set, include just the resources in the listed namespaces. Structure is documented below.

    BackupPlanBackupConfigEncryptionKey, BackupPlanBackupConfigEncryptionKeyArgs

    GcpKmsEncryptionKey string
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
    GcpKmsEncryptionKey string
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
    gcpKmsEncryptionKey String
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
    gcpKmsEncryptionKey string
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
    gcp_kms_encryption_key str
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
    gcpKmsEncryptionKey String
    Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/

    BackupPlanBackupConfigSelectedApplications, BackupPlanBackupConfigSelectedApplicationsArgs

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

    BackupPlanBackupConfigSelectedApplicationsNamespacedName, BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs

    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.

    BackupPlanBackupConfigSelectedNamespaces, BackupPlanBackupConfigSelectedNamespacesArgs

    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.

    BackupPlanBackupSchedule, BackupPlanBackupScheduleArgs

    CronSchedule string
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    Paused bool
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.
    CronSchedule string
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    Paused bool
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.
    cronSchedule String
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    paused Boolean
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.
    cronSchedule string
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    paused boolean
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.
    cron_schedule str
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    paused bool
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.
    cronSchedule String
    A standard cron string that defines a repeating schedule for creating Backups via this BackupPlan. If this is defined, then backupRetainDays must also be defined.
    paused Boolean
    This flag denotes whether automatic Backup creation is paused for this BackupPlan.

    BackupPlanRetentionPolicy, BackupPlanRetentionPolicyArgs

    BackupDeleteLockDays int
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    BackupRetainDays int
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    Locked bool
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.
    BackupDeleteLockDays int
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    BackupRetainDays int
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    Locked bool
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.
    backupDeleteLockDays Integer
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    backupRetainDays Integer
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    locked Boolean
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.
    backupDeleteLockDays number
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    backupRetainDays number
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    locked boolean
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.
    backup_delete_lock_days int
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    backup_retain_days int
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    locked bool
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.
    backupDeleteLockDays Number
    Minimum age for a Backup created via this BackupPlan (in days). Must be an integer value between 0-90 (inclusive). A Backup created under this BackupPlan will not be deletable until it reaches Backup's (create time + backup_delete_lock_days). Updating this field of a BackupPlan does not affect existing Backups. Backups created after a successful update will inherit this new value.
    backupRetainDays Number
    The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (createTime + backupRetainDays). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backupRetainDays must be >= backupDeleteLockDays. If cronSchedule is defined, then this must be <= 360 * the creation interval.]
    locked Boolean
    This flag denotes whether the retention policy of this BackupPlan is locked. If set to True, no further update is allowed on this policy, including the locked field itself.

    Import

    BackupPlan can be imported using any of these accepted formats:

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

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

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

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

    $ pulumi import gcp:gkebackup/backupPlan:BackupPlan default projects/{{project}}/locations/{{location}}/backupPlans/{{name}}
    
    $ pulumi import gcp:gkebackup/backupPlan:BackupPlan default {{project}}/{{location}}/{{name}}
    
    $ pulumi import gcp:gkebackup/backupPlan:BackupPlan 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.18.0 published on Wednesday, Apr 10, 2024 by Pulumi