gcp logo
Google Cloud Classic v6.48.0, Jan 24 23

gcp.gkebackup.BackupPlan

Represents a Backup Plan instance.

To get more information about BackupPlan, see:

Example Usage

Gkebackup Backupplan Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.Container.Cluster("primary", new()
    {
        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,
            },
        },
    });

    var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
    {
        Cluster = primary.Id,
        Location = "us-central1",
        BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
        {
            IncludeVolumeData = true,
            IncludeSecrets = true,
            AllNamespaces = true,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
			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
	})
}
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()        
            .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())
            .build());

        var basic = new BackupPlan("basic", BackupPlanArgs.builder()        
            .cluster(primary.id())
            .location("us-central1")
            .backupConfig(BackupPlanBackupConfigArgs.builder()
                .includeVolumeData(true)
                .includeSecrets(true)
                .allNamespaces(true)
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.container.Cluster("primary",
    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,
        ),
    ))
basic = gcp.gkebackup.BackupPlan("basic",
    cluster=primary.id,
    location="us-central1",
    backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
        include_volume_data=True,
        include_secrets=True,
        all_namespaces=True,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.container.Cluster("primary", {
    location: "us-central1",
    initialNodeCount: 1,
    workloadIdentityConfig: {
        workloadPool: "my-project-name.svc.id.goog",
    },
    addonsConfig: {
        gkeBackupAgentConfig: {
            enabled: true,
        },
    },
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
    cluster: primary.id,
    location: "us-central1",
    backupConfig: {
        includeVolumeData: true,
        includeSecrets: true,
        allNamespaces: true,
    },
});
resources:
  primary:
    type: gcp:container:Cluster
    properties:
      location: us-central1
      initialNodeCount: 1
      workloadIdentityConfig:
        workloadPool: my-project-name.svc.id.goog
      addonsConfig:
        gkeBackupAgentConfig:
          enabled: true
  basic:
    type: gcp:gkebackup:BackupPlan
    properties:
      cluster: ${primary.id}
      location: us-central1
      backupConfig:
        includeVolumeData: true
        includeSecrets: true
        allNamespaces: true

Gkebackup Backupplan Autopilot

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.Container.Cluster("primary", new()
    {
        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,
            },
        },
    });

    var autopilot = new Gcp.GkeBackup.BackupPlan("autopilot", new()
    {
        Cluster = primary.Id,
        Location = "us-central1",
        BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
        {
            IncludeVolumeData = true,
            IncludeSecrets = true,
            AllNamespaces = true,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = gkebackup.NewBackupPlan(ctx, "autopilot", &gkebackup.BackupPlanArgs{
			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
	})
}
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()        
            .location("us-central1")
            .enableAutopilot(true)
            .ipAllocationPolicy()
            .releaseChannel(ClusterReleaseChannelArgs.builder()
                .channel("RAPID")
                .build())
            .addonsConfig(ClusterAddonsConfigArgs.builder()
                .gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
                    .enabled(true)
                    .build())
                .build())
            .build());

        var autopilot = new BackupPlan("autopilot", BackupPlanArgs.builder()        
            .cluster(primary.id())
            .location("us-central1")
            .backupConfig(BackupPlanBackupConfigArgs.builder()
                .includeVolumeData(true)
                .includeSecrets(true)
                .allNamespaces(true)
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.container.Cluster("primary",
    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,
        ),
    ))
autopilot = gcp.gkebackup.BackupPlan("autopilot",
    cluster=primary.id,
    location="us-central1",
    backup_config=gcp.gkebackup.BackupPlanBackupConfigArgs(
        include_volume_data=True,
        include_secrets=True,
        all_namespaces=True,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.container.Cluster("primary", {
    location: "us-central1",
    enableAutopilot: true,
    ipAllocationPolicy: {},
    releaseChannel: {
        channel: "RAPID",
    },
    addonsConfig: {
        gkeBackupAgentConfig: {
            enabled: true,
        },
    },
});
const autopilot = new gcp.gkebackup.BackupPlan("autopilot", {
    cluster: primary.id,
    location: "us-central1",
    backupConfig: {
        includeVolumeData: true,
        includeSecrets: true,
        allNamespaces: true,
    },
});
resources:
  primary:
    type: gcp:container:Cluster
    properties:
      location: us-central1
      enableAutopilot: true
      ipAllocationPolicy: {}
      releaseChannel:
        channel: RAPID
      addonsConfig:
        gkeBackupAgentConfig:
          enabled: true
  autopilot:
    type: gcp:gkebackup:BackupPlan
    properties:
      cluster: ${primary.id}
      location: us-central1
      backupConfig:
        includeVolumeData: true
        includeSecrets: true
        allNamespaces: true

Gkebackup Backupplan Cmek

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.Container.Cluster("primary", new()
    {
        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,
            },
        },
    });

    var keyRing = new Gcp.Kms.KeyRing("keyRing", new()
    {
        Location = "us-central1",
    });

    var cryptoKey = new Gcp.Kms.CryptoKey("cryptoKey", new()
    {
        KeyRing = keyRing.Id,
    });

    var cmek = new Gcp.GkeBackup.BackupPlan("cmek", new()
    {
        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 main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/gkebackup"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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),
				},
			},
		})
		if err != nil {
			return err
		}
		keyRing, err := kms.NewKeyRing(ctx, "keyRing", &kms.KeyRingArgs{
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		cryptoKey, err := kms.NewCryptoKey(ctx, "cryptoKey", &kms.CryptoKeyArgs{
			KeyRing: keyRing.ID(),
		})
		if err != nil {
			return err
		}
		_, err = gkebackup.NewBackupPlan(ctx, "cmek", &gkebackup.BackupPlanArgs{
			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
	})
}
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()        
            .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())
            .build());

        var keyRing = new KeyRing("keyRing", KeyRingArgs.builder()        
            .location("us-central1")
            .build());

        var cryptoKey = new CryptoKey("cryptoKey", CryptoKeyArgs.builder()        
            .keyRing(keyRing.id())
            .build());

        var cmek = new BackupPlan("cmek", BackupPlanArgs.builder()        
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.container.Cluster("primary",
    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,
        ),
    ))
key_ring = gcp.kms.KeyRing("keyRing", location="us-central1")
crypto_key = gcp.kms.CryptoKey("cryptoKey", key_ring=key_ring.id)
cmek = gcp.gkebackup.BackupPlan("cmek",
    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,
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.container.Cluster("primary", {
    location: "us-central1",
    initialNodeCount: 1,
    workloadIdentityConfig: {
        workloadPool: "my-project-name.svc.id.goog",
    },
    addonsConfig: {
        gkeBackupAgentConfig: {
            enabled: true,
        },
    },
});
const keyRing = new gcp.kms.KeyRing("keyRing", {location: "us-central1"});
const cryptoKey = new gcp.kms.CryptoKey("cryptoKey", {keyRing: keyRing.id});
const cmek = new gcp.gkebackup.BackupPlan("cmek", {
    cluster: primary.id,
    location: "us-central1",
    backupConfig: {
        includeVolumeData: true,
        includeSecrets: true,
        selectedNamespaces: {
            namespaces: [
                "default",
                "test",
            ],
        },
        encryptionKey: {
            gcpKmsEncryptionKey: cryptoKey.id,
        },
    },
});
resources:
  primary:
    type: gcp:container:Cluster
    properties:
      location: us-central1
      initialNodeCount: 1
      workloadIdentityConfig:
        workloadPool: my-project-name.svc.id.goog
      addonsConfig:
        gkeBackupAgentConfig:
          enabled: true
  cmek:
    type: gcp:gkebackup:BackupPlan
    properties:
      cluster: ${primary.id}
      location: us-central1
      backupConfig:
        includeVolumeData: true
        includeSecrets: true
        selectedNamespaces:
          namespaces:
            - default
            - test
        encryptionKey:
          gcpKmsEncryptionKey: ${cryptoKey.id}
  cryptoKey:
    type: gcp:kms:CryptoKey
    properties:
      keyRing: ${keyRing.id}
  keyRing:
    type: gcp:kms:KeyRing
    properties:
      location: us-central1

Gkebackup Backupplan Full

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var primary = new Gcp.Container.Cluster("primary", new()
    {
        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,
            },
        },
    });

    var full = new Gcp.GkeBackup.BackupPlan("full", new()
    {
        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 main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/container"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = gkebackup.NewBackupPlan(ctx, "full", &gkebackup.BackupPlanArgs{
			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
	})
}
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()        
            .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())
            .build());

        var full = new BackupPlan("full", BackupPlanArgs.builder()        
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

primary = gcp.container.Cluster("primary",
    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,
        ),
    ))
full = gcp.gkebackup.BackupPlan("full",
    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",
                ),
            ],
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const primary = new gcp.container.Cluster("primary", {
    location: "us-central1",
    initialNodeCount: 1,
    workloadIdentityConfig: {
        workloadPool: "my-project-name.svc.id.goog",
    },
    addonsConfig: {
        gkeBackupAgentConfig: {
            enabled: true,
        },
    },
});
const full = new gcp.gkebackup.BackupPlan("full", {
    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",
                },
            ],
        },
    },
});
resources:
  primary:
    type: gcp:container:Cluster
    properties:
      location: us-central1
      initialNodeCount: 1
      workloadIdentityConfig:
        workloadPool: my-project-name.svc.id.goog
      addonsConfig:
        gkeBackupAgentConfig:
          enabled: true
  full:
    type: gcp:gkebackup:BackupPlan
    properties:
      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

new BackupPlan(name: string, args: BackupPlanArgs, opts?: CustomResourceOptions);
@overload
def BackupPlan(resource_name: 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,
               labels: Optional[Mapping[str, str]] = None,
               location: Optional[str] = None,
               name: Optional[str] = None,
               project: Optional[str] = None,
               retention_policy: Optional[BackupPlanRetentionPolicyArgs] = None)
@overload
def BackupPlan(resource_name: str,
               args: BackupPlanArgs,
               opts: Optional[ResourceOptions] = 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.

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.

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 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 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" }.

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 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" }.

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 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 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" }.

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 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 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" }.

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 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" }.

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" }.

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:

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.

Uid string

Server generated, unique identifier of UUID format.

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.

Uid string

Server generated, unique identifier of UUID format.

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.

uid String

Server generated, unique identifier of UUID format.

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.

uid string

Server generated, unique identifier of UUID format.

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.

uid str

Server generated, unique identifier of UUID format.

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.

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,
        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,
        retention_policy: Optional[BackupPlanRetentionPolicyArgs] = 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 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.

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" }.

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.

RetentionPolicy BackupPlanRetentionPolicyArgs

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

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.

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" }.

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.

RetentionPolicy BackupPlanRetentionPolicyArgs

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

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

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" }.

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.

retentionPolicy BackupPlanRetentionPolicyArgs

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

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

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" }.

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.

retentionPolicy BackupPlanRetentionPolicyArgs

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

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.

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" }.

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.

retention_policy BackupPlanRetentionPolicyArgs

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

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.

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" }.

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.

retentionPolicy Property Map

RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.

uid String

Server generated, unique identifier of UUID format.

Supporting Types

BackupPlanBackupConfig

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

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

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

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

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

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

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

 $ 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}}

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.