gcp.gkebackup.BackupPlan
Explore with Pulumi AI
Represents a Backup Plan instance.
To get more information about BackupPlan, see:
- API documentation
- How-to Guides
Example Usage
Gkebackup Backupplan Basic
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()
{
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 System.Linq;
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 System.Linq;
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 System.Linq;
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.
- Backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- Backup
Schedule BackupPlan Backup Schedule 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.
- Retention
Policy BackupPlan Retention Policy 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.
- Backup
Config BackupPlan Backup Config Args Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- Backup
Schedule BackupPlan Backup Schedule Args 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.
- Retention
Policy BackupPlan Retention Policy Args 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.
- backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule BackupPlan Backup Schedule 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.
- retention
Policy BackupPlan Retention Policy 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.
- backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule BackupPlan Backup Schedule 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.
- retention
Policy BackupPlan Retention Policy 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 BackupPlan Backup Config Args Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup_
schedule BackupPlan Backup Schedule Args 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 BackupPlan Retention Policy Args 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.
- backup
Config Property Map Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule 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.
- retention
Policy 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.
- Protected
Pod intCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- State string
The State of the BackupPlan.
- State
Reason string Detailed description of why BackupPlan is in its current state.
- 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.
- Protected
Pod intCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- State string
The State of the BackupPlan.
- State
Reason string Detailed description of why BackupPlan is in its current state.
- 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.
- protected
Pod IntegerCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- state String
The State of the BackupPlan.
- state
Reason String Detailed description of why BackupPlan is in its current state.
- 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.
- protected
Pod numberCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- state string
The State of the BackupPlan.
- state
Reason string Detailed description of why BackupPlan is in its current state.
- 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_ intcount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- 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.
- 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.
- protected
Pod NumberCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- state String
The State of the BackupPlan.
- state
Reason 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,
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,
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.
- Backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- Backup
Schedule BackupPlan Backup Schedule 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.
- Protected
Pod intCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- Retention
Policy BackupPlan Retention Policy RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
- State string
The State of the BackupPlan.
- State
Reason string Detailed description of why BackupPlan is in its current state.
- Uid string
Server generated, unique identifier of UUID format.
- Backup
Config BackupPlan Backup Config Args Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- Backup
Schedule BackupPlan Backup Schedule Args 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.
- Protected
Pod intCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- Retention
Policy BackupPlan Retention Policy Args RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
- State string
The State of the BackupPlan.
- State
Reason string Detailed description of why BackupPlan is in its current state.
- Uid string
Server generated, unique identifier of UUID format.
- backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule BackupPlan Backup Schedule 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.
- protected
Pod IntegerCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- retention
Policy BackupPlan Retention Policy RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
- state String
The State of the BackupPlan.
- state
Reason String Detailed description of why BackupPlan is in its current state.
- uid String
Server generated, unique identifier of UUID format.
- backup
Config BackupPlan Backup Config Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule BackupPlan Backup Schedule 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.
- protected
Pod numberCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- retention
Policy BackupPlan Retention Policy RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
- state string
The State of the BackupPlan.
- state
Reason string Detailed description of why BackupPlan is in its current state.
- uid string
Server generated, unique identifier of UUID format.
- backup_
config BackupPlan Backup Config Args Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup_
schedule BackupPlan Backup Schedule Args 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_ intcount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- retention_
policy BackupPlan Retention Policy Args 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.
- backup
Config Property Map Defines the configuration of Backups created via this BackupPlan. Structure is documented below.
- backup
Schedule 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.
- protected
Pod NumberCount The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.
- retention
Policy Property Map RetentionPolicy governs lifecycle of Backups created under this plan. Structure is documented below.
- state String
The State of the BackupPlan.
- state
Reason String Detailed description of why BackupPlan is in its current state.
- uid String
Server generated, unique identifier of UUID format.
Supporting Types
BackupPlanBackupConfig, BackupPlanBackupConfigArgs
- All
Namespaces bool If True, include all namespaced resources.
- Encryption
Key BackupPlan Backup Config Encryption Key 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 boolData This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- Selected
Applications BackupPlan Backup Config Selected Applications A list of namespaced Kubernetes Resources. Structure is documented below.
- Selected
Namespaces BackupPlan Backup Config Selected Namespaces 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 BackupPlan Backup Config Encryption Key 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 boolData This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- Selected
Applications BackupPlan Backup Config Selected Applications A list of namespaced Kubernetes Resources. Structure is documented below.
- Selected
Namespaces BackupPlan Backup Config Selected Namespaces If set, include just the resources in the listed namespaces. Structure is documented below.
- all
Namespaces Boolean If True, include all namespaced resources.
- encryption
Key BackupPlan Backup Config Encryption Key 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 Boolean This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
- include
Volume BooleanData This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- selected
Applications BackupPlan Backup Config Selected Applications A list of namespaced Kubernetes Resources. Structure is documented below.
- selected
Namespaces BackupPlan Backup Config Selected Namespaces If set, include just the resources in the listed namespaces. Structure is documented below.
- all
Namespaces boolean If True, include all namespaced resources.
- encryption
Key BackupPlan Backup Config Encryption Key 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 boolean This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
- include
Volume booleanData This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- selected
Applications BackupPlan Backup Config Selected Applications A list of namespaced Kubernetes Resources. Structure is documented below.
- selected
Namespaces BackupPlan Backup Config Selected Namespaces 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 BackupPlan Backup Config Encryption Key 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_ booldata This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- selected_
applications BackupPlan Backup Config Selected Applications A list of namespaced Kubernetes Resources. Structure is documented below.
- selected_
namespaces BackupPlan Backup Config Selected Namespaces If set, include just the resources in the listed namespaces. Structure is documented below.
- all
Namespaces Boolean If True, include all namespaced resources.
- encryption
Key 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.
- include
Secrets Boolean This flag specifies whether Kubernetes Secret resources should be included when they fall into the scope of Backups.
- include
Volume BooleanData This flag specifies whether volume data should be backed up when PVCs are included in the scope of a Backup.
- selected
Applications Property Map A list of namespaced Kubernetes Resources. Structure is documented below.
- selected
Namespaces Property Map If set, include just the resources in the listed namespaces. Structure is documented below.
BackupPlanBackupConfigEncryptionKey, BackupPlanBackupConfigEncryptionKeyArgs
- Gcp
Kms stringEncryption Key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
- Gcp
Kms stringEncryption Key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
- gcp
Kms StringEncryption Key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
- gcp
Kms stringEncryption Key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
- gcp_
kms_ strencryption_ key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
- gcp
Kms StringEncryption Key Google Cloud KMS encryption key. Format: projects//locations//keyRings//cryptoKeys/
BackupPlanBackupConfigSelectedApplications, BackupPlanBackupConfigSelectedApplicationsArgs
- Namespaced
Names List<BackupPlan Backup Config Selected Applications Namespaced Name> A list of namespaced Kubernetes resources. Structure is documented below.
- Namespaced
Names []BackupPlan Backup Config Selected Applications Namespaced Name A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced
Names List<BackupPlan Backup Config Selected Applications Namespaced Name> A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced
Names BackupPlan Backup Config Selected Applications Namespaced Name[] A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced_
names Sequence[BackupPlan Backup Config Selected Applications Namespaced Name] A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced
Names List<Property Map> A list of namespaced Kubernetes resources. Structure is documented below.
BackupPlanBackupConfigSelectedApplicationsNamespacedName, BackupPlanBackupConfigSelectedApplicationsNamespacedNameArgs
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
- Cron
Schedule 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.
- Cron
Schedule 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.
- cron
Schedule 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 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.
- cron
Schedule 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
- Backup
Delete intLock Days 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 intDays 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.
- Backup
Delete intLock Days 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 intDays 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.
- backup
Delete IntegerLock Days 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 IntegerDays 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 numberLock Days 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 numberDays 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_ intlock_ days 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_ intdays 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.
- backup
Delete NumberLock Days 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 NumberDays 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.