gcp.gkebackup.RestorePlan
Explore with Pulumi AI
Represents a Restore Plan instance.
To get more information about RestorePlan, see:
- API documentation
- How-to Guides
Example Usage
Gkebackup Restoreplan All Namespaces
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "restore-all-ns-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "restore-all-ns",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const allNs = new gcp.gkebackup.RestorePlan("all_ns", {
name: "restore-all-ns",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
allNamespaces: true,
namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
clusterResourceRestoreScope: {
allGroupKinds: true,
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="restore-all-ns-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="restore-all-ns",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
all_ns = gcp.gkebackup.RestorePlan("all_ns",
name="restore-all-ns",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"all_namespaces": True,
"namespaced_resource_restore_mode": "FAIL_ON_CONFLICT",
"volume_data_restore_policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"cluster_resource_restore_scope": {
"all_group_kinds": True,
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("restore-all-ns-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("restore-all-ns"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "all_ns", &gkebackup.RestorePlanArgs{
Name: pulumi.String("restore-all-ns"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
AllNamespaces: pulumi.Bool(true),
NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
VolumeDataRestorePolicy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(true),
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "restore-all-ns-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "restore-all-ns",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var allNs = new Gcp.GkeBackup.RestorePlan("all_ns", new()
{
Name = "restore-all-ns",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
AllNamespaces = true,
NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = true,
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("restore-all-ns-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("restore-all-ns")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var allNs = new RestorePlan("allNs", RestorePlanArgs.builder()
.name("restore-all-ns")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.allNamespaces(true)
.namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
.volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(true)
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: restore-all-ns-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: restore-all-ns
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
allNs:
type: gcp:gkebackup:RestorePlan
name: all_ns
properties:
name: restore-all-ns
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
allNamespaces: true
namespacedResourceRestoreMode: FAIL_ON_CONFLICT
volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
clusterResourceRestoreScope:
allGroupKinds: true
clusterResourceConflictPolicy: USE_EXISTING_VERSION
Gkebackup Restoreplan Rollback Namespace
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "rollback-ns-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "rollback-ns",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const rollbackNs = new gcp.gkebackup.RestorePlan("rollback_ns", {
name: "rollback-ns-rp",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
selectedNamespaces: {
namespaces: ["my-ns"],
},
namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
clusterResourceRestoreScope: {
selectedGroupKinds: [
{
resourceGroup: "apiextension.k8s.io",
resourceKind: "CustomResourceDefinition",
},
{
resourceGroup: "storage.k8s.io",
resourceKind: "StorageClass",
},
],
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="rollback-ns-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="rollback-ns",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
rollback_ns = gcp.gkebackup.RestorePlan("rollback_ns",
name="rollback-ns-rp",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"selected_namespaces": {
"namespaces": ["my-ns"],
},
"namespaced_resource_restore_mode": "DELETE_AND_RESTORE",
"volume_data_restore_policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"cluster_resource_restore_scope": {
"selected_group_kinds": [
{
"resource_group": "apiextension.k8s.io",
"resource_kind": "CustomResourceDefinition",
},
{
"resource_group": "storage.k8s.io",
"resource_kind": "StorageClass",
},
],
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("rollback-ns-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("rollback-ns"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "rollback_ns", &gkebackup.RestorePlanArgs{
Name: pulumi.String("rollback-ns-rp"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
Namespaces: pulumi.StringArray{
pulumi.String("my-ns"),
},
},
NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
VolumeDataRestorePolicy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
SelectedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArray{
&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
ResourceGroup: pulumi.String("apiextension.k8s.io"),
ResourceKind: pulumi.String("CustomResourceDefinition"),
},
&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
ResourceGroup: pulumi.String("storage.k8s.io"),
ResourceKind: pulumi.String("StorageClass"),
},
},
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "rollback-ns-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "rollback-ns",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var rollbackNs = new Gcp.GkeBackup.RestorePlan("rollback_ns", new()
{
Name = "rollback-ns-rp",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
{
Namespaces = new[]
{
"my-ns",
},
},
NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
SelectedGroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
{
ResourceGroup = "apiextension.k8s.io",
ResourceKind = "CustomResourceDefinition",
},
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
{
ResourceGroup = "storage.k8s.io",
ResourceKind = "StorageClass",
},
},
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedNamespacesArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("rollback-ns-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("rollback-ns")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var rollbackNs = new RestorePlan("rollbackNs", RestorePlanArgs.builder()
.name("rollback-ns-rp")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
.namespaces("my-ns")
.build())
.namespacedResourceRestoreMode("DELETE_AND_RESTORE")
.volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.selectedGroupKinds(
RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
.resourceGroup("apiextension.k8s.io")
.resourceKind("CustomResourceDefinition")
.build(),
RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
.resourceGroup("storage.k8s.io")
.resourceKind("StorageClass")
.build())
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: rollback-ns-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: rollback-ns
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
rollbackNs:
type: gcp:gkebackup:RestorePlan
name: rollback_ns
properties:
name: rollback-ns-rp
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
selectedNamespaces:
namespaces:
- my-ns
namespacedResourceRestoreMode: DELETE_AND_RESTORE
volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
clusterResourceRestoreScope:
selectedGroupKinds:
- resourceGroup: apiextension.k8s.io
resourceKind: CustomResourceDefinition
- resourceGroup: storage.k8s.io
resourceKind: StorageClass
clusterResourceConflictPolicy: USE_EXISTING_VERSION
Gkebackup Restoreplan Protected Application
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "rollback-app-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "rollback-app",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const rollbackApp = new gcp.gkebackup.RestorePlan("rollback_app", {
name: "rollback-app-rp",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
selectedApplications: {
namespacedNames: [{
name: "my-app",
namespace: "my-ns",
}],
},
namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
volumeDataRestorePolicy: "REUSE_VOLUME_HANDLE_FROM_BACKUP",
clusterResourceRestoreScope: {
noGroupKinds: true,
},
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="rollback-app-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="rollback-app",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
rollback_app = gcp.gkebackup.RestorePlan("rollback_app",
name="rollback-app-rp",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"selected_applications": {
"namespaced_names": [{
"name": "my-app",
"namespace": "my-ns",
}],
},
"namespaced_resource_restore_mode": "DELETE_AND_RESTORE",
"volume_data_restore_policy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
"cluster_resource_restore_scope": {
"no_group_kinds": True,
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("rollback-app-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("rollback-app"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "rollback_app", &gkebackup.RestorePlanArgs{
Name: pulumi.String("rollback-app-rp"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
SelectedApplications: &gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs{
NamespacedNames: gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArray{
&gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs{
Name: pulumi.String("my-app"),
Namespace: pulumi.String("my-ns"),
},
},
},
NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
VolumeDataRestorePolicy: pulumi.String("REUSE_VOLUME_HANDLE_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
NoGroupKinds: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "rollback-app-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "rollback-app",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var rollbackApp = new Gcp.GkeBackup.RestorePlan("rollback_app", new()
{
Name = "rollback-app-rp",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
SelectedApplications = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsArgs
{
NamespacedNames = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs
{
Name = "my-app",
Namespace = "my-ns",
},
},
},
NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
VolumeDataRestorePolicy = "REUSE_VOLUME_HANDLE_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
NoGroupKinds = true,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedApplicationsArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("rollback-app-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("rollback-app")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var rollbackApp = new RestorePlan("rollbackApp", RestorePlanArgs.builder()
.name("rollback-app-rp")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.selectedApplications(RestorePlanRestoreConfigSelectedApplicationsArgs.builder()
.namespacedNames(RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs.builder()
.name("my-app")
.namespace("my-ns")
.build())
.build())
.namespacedResourceRestoreMode("DELETE_AND_RESTORE")
.volumeDataRestorePolicy("REUSE_VOLUME_HANDLE_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.noGroupKinds(true)
.build())
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: rollback-app-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: rollback-app
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
rollbackApp:
type: gcp:gkebackup:RestorePlan
name: rollback_app
properties:
name: rollback-app-rp
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
selectedApplications:
namespacedNames:
- name: my-app
namespace: my-ns
namespacedResourceRestoreMode: DELETE_AND_RESTORE
volumeDataRestorePolicy: REUSE_VOLUME_HANDLE_FROM_BACKUP
clusterResourceRestoreScope:
noGroupKinds: true
Gkebackup Restoreplan All Cluster Resources
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "all-groupkinds-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "all-groupkinds",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const allClusterResources = new gcp.gkebackup.RestorePlan("all_cluster_resources", {
name: "all-groupkinds-rp",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
noNamespaces: true,
namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
clusterResourceRestoreScope: {
allGroupKinds: true,
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="all-groupkinds-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="all-groupkinds",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
all_cluster_resources = gcp.gkebackup.RestorePlan("all_cluster_resources",
name="all-groupkinds-rp",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"no_namespaces": True,
"namespaced_resource_restore_mode": "FAIL_ON_CONFLICT",
"cluster_resource_restore_scope": {
"all_group_kinds": True,
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("all-groupkinds-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("all-groupkinds"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "all_cluster_resources", &gkebackup.RestorePlanArgs{
Name: pulumi.String("all-groupkinds-rp"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
NoNamespaces: pulumi.Bool(true),
NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(true),
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "all-groupkinds-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "all-groupkinds",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var allClusterResources = new Gcp.GkeBackup.RestorePlan("all_cluster_resources", new()
{
Name = "all-groupkinds-rp",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
NoNamespaces = true,
NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = true,
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("all-groupkinds-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("all-groupkinds")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var allClusterResources = new RestorePlan("allClusterResources", RestorePlanArgs.builder()
.name("all-groupkinds-rp")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.noNamespaces(true)
.namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(true)
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: all-groupkinds-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: all-groupkinds
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
allClusterResources:
type: gcp:gkebackup:RestorePlan
name: all_cluster_resources
properties:
name: all-groupkinds-rp
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
noNamespaces: true
namespacedResourceRestoreMode: FAIL_ON_CONFLICT
clusterResourceRestoreScope:
allGroupKinds: true
clusterResourceConflictPolicy: USE_EXISTING_VERSION
Gkebackup Restoreplan Rename Namespace
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "rename-ns-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "rename-ns",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const renameNs = new gcp.gkebackup.RestorePlan("rename_ns", {
name: "rename-ns-rp",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
selectedNamespaces: {
namespaces: ["ns1"],
},
namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
volumeDataRestorePolicy: "REUSE_VOLUME_HANDLE_FROM_BACKUP",
clusterResourceRestoreScope: {
noGroupKinds: true,
},
transformationRules: [
{
description: "rename namespace from ns1 to ns2",
resourceFilter: {
groupKinds: [{
resourceKind: "Namespace",
}],
jsonPath: ".metadata[?(@.name == 'ns1')]",
},
fieldActions: [{
op: "REPLACE",
path: "/metadata/name",
value: "ns2",
}],
},
{
description: "move all resources from ns1 to ns2",
resourceFilter: {
namespaces: ["ns1"],
},
fieldActions: [{
op: "REPLACE",
path: "/metadata/namespace",
value: "ns2",
}],
},
],
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="rename-ns-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="rename-ns",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
rename_ns = gcp.gkebackup.RestorePlan("rename_ns",
name="rename-ns-rp",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"selected_namespaces": {
"namespaces": ["ns1"],
},
"namespaced_resource_restore_mode": "FAIL_ON_CONFLICT",
"volume_data_restore_policy": "REUSE_VOLUME_HANDLE_FROM_BACKUP",
"cluster_resource_restore_scope": {
"no_group_kinds": True,
},
"transformation_rules": [
{
"description": "rename namespace from ns1 to ns2",
"resource_filter": {
"group_kinds": [{
"resource_kind": "Namespace",
}],
"json_path": ".metadata[?(@.name == 'ns1')]",
},
"field_actions": [{
"op": "REPLACE",
"path": "/metadata/name",
"value": "ns2",
}],
},
{
"description": "move all resources from ns1 to ns2",
"resource_filter": {
"namespaces": ["ns1"],
},
"field_actions": [{
"op": "REPLACE",
"path": "/metadata/namespace",
"value": "ns2",
}],
},
],
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("rename-ns-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("rename-ns"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "rename_ns", &gkebackup.RestorePlanArgs{
Name: pulumi.String("rename-ns-rp"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
Namespaces: pulumi.StringArray{
pulumi.String("ns1"),
},
},
NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
VolumeDataRestorePolicy: pulumi.String("REUSE_VOLUME_HANDLE_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
NoGroupKinds: pulumi.Bool(true),
},
TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
Description: pulumi.String("rename namespace from ns1 to ns2"),
ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
ResourceKind: pulumi.String("Namespace"),
},
},
JsonPath: pulumi.String(".metadata[?(@.name == 'ns1')]"),
},
FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
Op: pulumi.String("REPLACE"),
Path: pulumi.String("/metadata/name"),
Value: pulumi.String("ns2"),
},
},
},
&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
Description: pulumi.String("move all resources from ns1 to ns2"),
ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
Namespaces: pulumi.StringArray{
pulumi.String("ns1"),
},
},
FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
Op: pulumi.String("REPLACE"),
Path: pulumi.String("/metadata/namespace"),
Value: pulumi.String("ns2"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "rename-ns-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "rename-ns",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var renameNs = new Gcp.GkeBackup.RestorePlan("rename_ns", new()
{
Name = "rename-ns-rp",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
{
Namespaces = new[]
{
"ns1",
},
},
NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
VolumeDataRestorePolicy = "REUSE_VOLUME_HANDLE_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
NoGroupKinds = true,
},
TransformationRules = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
{
Description = "rename namespace from ns1 to ns2",
ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
{
GroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
{
ResourceKind = "Namespace",
},
},
JsonPath = ".metadata[?(@.name == 'ns1')]",
},
FieldActions = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
{
Op = "REPLACE",
Path = "/metadata/name",
Value = "ns2",
},
},
},
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
{
Description = "move all resources from ns1 to ns2",
ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
{
Namespaces = new[]
{
"ns1",
},
},
FieldActions = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
{
Op = "REPLACE",
Path = "/metadata/namespace",
Value = "ns2",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigSelectedNamespacesArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("rename-ns-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("rename-ns")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var renameNs = new RestorePlan("renameNs", RestorePlanArgs.builder()
.name("rename-ns-rp")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
.namespaces("ns1")
.build())
.namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
.volumeDataRestorePolicy("REUSE_VOLUME_HANDLE_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.noGroupKinds(true)
.build())
.transformationRules(
RestorePlanRestoreConfigTransformationRuleArgs.builder()
.description("rename namespace from ns1 to ns2")
.resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
.groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
.resourceKind("Namespace")
.build())
.jsonPath(".metadata[?(@.name == 'ns1')]")
.build())
.fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
.op("REPLACE")
.path("/metadata/name")
.value("ns2")
.build())
.build(),
RestorePlanRestoreConfigTransformationRuleArgs.builder()
.description("move all resources from ns1 to ns2")
.resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
.namespaces("ns1")
.build())
.fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
.op("REPLACE")
.path("/metadata/namespace")
.value("ns2")
.build())
.build())
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: rename-ns-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: rename-ns
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
renameNs:
type: gcp:gkebackup:RestorePlan
name: rename_ns
properties:
name: rename-ns-rp
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
selectedNamespaces:
namespaces:
- ns1
namespacedResourceRestoreMode: FAIL_ON_CONFLICT
volumeDataRestorePolicy: REUSE_VOLUME_HANDLE_FROM_BACKUP
clusterResourceRestoreScope:
noGroupKinds: true
transformationRules:
- description: rename namespace from ns1 to ns2
resourceFilter:
groupKinds:
- resourceKind: Namespace
jsonPath: .metadata[?(@.name == 'ns1')]
fieldActions:
- op: REPLACE
path: /metadata/name
value: ns2
- description: move all resources from ns1 to ns2
resourceFilter:
namespaces:
- ns1
fieldActions:
- op: REPLACE
path: /metadata/namespace
value: ns2
Gkebackup Restoreplan Second Transformation
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "transform-rule-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "transform-rule",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const transformRule = new gcp.gkebackup.RestorePlan("transform_rule", {
name: "transform-rule-rp",
description: "copy nginx env variables",
labels: {
app: "nginx",
},
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
excludedNamespaces: {
namespaces: ["my-ns"],
},
namespacedResourceRestoreMode: "DELETE_AND_RESTORE",
volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
clusterResourceRestoreScope: {
excludedGroupKinds: [{
resourceGroup: "apiextension.k8s.io",
resourceKind: "CustomResourceDefinition",
}],
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
transformationRules: [{
description: "Copy environment variables from the nginx container to the install init container.",
resourceFilter: {
groupKinds: [{
resourceKind: "Pod",
resourceGroup: "",
}],
jsonPath: ".metadata[?(@.name == 'nginx')]",
},
fieldActions: [{
op: "COPY",
path: "/spec/initContainers/0/env",
fromPath: "/spec/containers/0/env",
}],
}],
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="transform-rule-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="transform-rule",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
transform_rule = gcp.gkebackup.RestorePlan("transform_rule",
name="transform-rule-rp",
description="copy nginx env variables",
labels={
"app": "nginx",
},
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"excluded_namespaces": {
"namespaces": ["my-ns"],
},
"namespaced_resource_restore_mode": "DELETE_AND_RESTORE",
"volume_data_restore_policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"cluster_resource_restore_scope": {
"excluded_group_kinds": [{
"resource_group": "apiextension.k8s.io",
"resource_kind": "CustomResourceDefinition",
}],
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
"transformation_rules": [{
"description": "Copy environment variables from the nginx container to the install init container.",
"resource_filter": {
"group_kinds": [{
"resource_kind": "Pod",
"resource_group": "",
}],
"json_path": ".metadata[?(@.name == 'nginx')]",
},
"field_actions": [{
"op": "COPY",
"path": "/spec/initContainers/0/env",
"from_path": "/spec/containers/0/env",
}],
}],
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("transform-rule-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("transform-rule"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "transform_rule", &gkebackup.RestorePlanArgs{
Name: pulumi.String("transform-rule-rp"),
Description: pulumi.String("copy nginx env variables"),
Labels: pulumi.StringMap{
"app": pulumi.String("nginx"),
},
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
ExcludedNamespaces: &gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs{
Namespaces: pulumi.StringArray{
pulumi.String("my-ns"),
},
},
NamespacedResourceRestoreMode: pulumi.String("DELETE_AND_RESTORE"),
VolumeDataRestorePolicy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
ExcludedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArray{
&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs{
ResourceGroup: pulumi.String("apiextension.k8s.io"),
ResourceKind: pulumi.String("CustomResourceDefinition"),
},
},
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
Description: pulumi.String("Copy environment variables from the nginx container to the install init container."),
ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
ResourceKind: pulumi.String("Pod"),
ResourceGroup: pulumi.String(""),
},
},
JsonPath: pulumi.String(".metadata[?(@.name == 'nginx')]"),
},
FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
Op: pulumi.String("COPY"),
Path: pulumi.String("/spec/initContainers/0/env"),
FromPath: pulumi.String("/spec/containers/0/env"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "transform-rule-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "transform-rule",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var transformRule = new Gcp.GkeBackup.RestorePlan("transform_rule", new()
{
Name = "transform-rule-rp",
Description = "copy nginx env variables",
Labels =
{
{ "app", "nginx" },
},
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
ExcludedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigExcludedNamespacesArgs
{
Namespaces = new[]
{
"my-ns",
},
},
NamespacedResourceRestoreMode = "DELETE_AND_RESTORE",
VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
ExcludedGroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs
{
ResourceGroup = "apiextension.k8s.io",
ResourceKind = "CustomResourceDefinition",
},
},
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
TransformationRules = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
{
Description = "Copy environment variables from the nginx container to the install init container.",
ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
{
GroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
{
ResourceKind = "Pod",
ResourceGroup = "",
},
},
JsonPath = ".metadata[?(@.name == 'nginx')]",
},
FieldActions = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
{
Op = "COPY",
Path = "/spec/initContainers/0/env",
FromPath = "/spec/containers/0/env",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigExcludedNamespacesArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("transform-rule-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("transform-rule")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var transformRule = new RestorePlan("transformRule", RestorePlanArgs.builder()
.name("transform-rule-rp")
.description("copy nginx env variables")
.labels(Map.of("app", "nginx"))
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.excludedNamespaces(RestorePlanRestoreConfigExcludedNamespacesArgs.builder()
.namespaces("my-ns")
.build())
.namespacedResourceRestoreMode("DELETE_AND_RESTORE")
.volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.excludedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs.builder()
.resourceGroup("apiextension.k8s.io")
.resourceKind("CustomResourceDefinition")
.build())
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.transformationRules(RestorePlanRestoreConfigTransformationRuleArgs.builder()
.description("Copy environment variables from the nginx container to the install init container.")
.resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
.groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
.resourceKind("Pod")
.resourceGroup("")
.build())
.jsonPath(".metadata[?(@.name == 'nginx')]")
.build())
.fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
.op("COPY")
.path("/spec/initContainers/0/env")
.fromPath("/spec/containers/0/env")
.build())
.build())
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: transform-rule-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: transform-rule
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
transformRule:
type: gcp:gkebackup:RestorePlan
name: transform_rule
properties:
name: transform-rule-rp
description: copy nginx env variables
labels:
app: nginx
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
excludedNamespaces:
namespaces:
- my-ns
namespacedResourceRestoreMode: DELETE_AND_RESTORE
volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
clusterResourceRestoreScope:
excludedGroupKinds:
- resourceGroup: apiextension.k8s.io
resourceKind: CustomResourceDefinition
clusterResourceConflictPolicy: USE_EXISTING_VERSION
transformationRules:
- description: Copy environment variables from the nginx container to the install init container.
resourceFilter:
groupKinds:
- resourceKind: Pod
resourceGroup:
jsonPath: .metadata[?(@.name == 'nginx')]
fieldActions:
- op: COPY
path: /spec/initContainers/0/env
fromPath: /spec/containers/0/env
Gkebackup Restoreplan Gitops Mode
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "gitops-mode-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "gitops-mode",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const gitopsMode = new gcp.gkebackup.RestorePlan("gitops_mode", {
name: "gitops-mode",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
allNamespaces: true,
namespacedResourceRestoreMode: "MERGE_SKIP_ON_CONFLICT",
volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
clusterResourceRestoreScope: {
allGroupKinds: true,
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="gitops-mode-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="gitops-mode",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
gitops_mode = gcp.gkebackup.RestorePlan("gitops_mode",
name="gitops-mode",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"all_namespaces": True,
"namespaced_resource_restore_mode": "MERGE_SKIP_ON_CONFLICT",
"volume_data_restore_policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"cluster_resource_restore_scope": {
"all_group_kinds": True,
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("gitops-mode-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("gitops-mode"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "gitops_mode", &gkebackup.RestorePlanArgs{
Name: pulumi.String("gitops-mode"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
AllNamespaces: pulumi.Bool(true),
NamespacedResourceRestoreMode: pulumi.String("MERGE_SKIP_ON_CONFLICT"),
VolumeDataRestorePolicy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(true),
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "gitops-mode-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "gitops-mode",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var gitopsMode = new Gcp.GkeBackup.RestorePlan("gitops_mode", new()
{
Name = "gitops-mode",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
AllNamespaces = true,
NamespacedResourceRestoreMode = "MERGE_SKIP_ON_CONFLICT",
VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = true,
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("gitops-mode-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("gitops-mode")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var gitopsMode = new RestorePlan("gitopsMode", RestorePlanArgs.builder()
.name("gitops-mode")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.allNamespaces(true)
.namespacedResourceRestoreMode("MERGE_SKIP_ON_CONFLICT")
.volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(true)
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: gitops-mode-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: gitops-mode
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
gitopsMode:
type: gcp:gkebackup:RestorePlan
name: gitops_mode
properties:
name: gitops-mode
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
allNamespaces: true
namespacedResourceRestoreMode: MERGE_SKIP_ON_CONFLICT
volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
clusterResourceRestoreScope:
allGroupKinds: true
clusterResourceConflictPolicy: USE_EXISTING_VERSION
Gkebackup Restoreplan Restore Order
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "restore-order-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "restore-order",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const restoreOrder = new gcp.gkebackup.RestorePlan("restore_order", {
name: "restore-order",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
allNamespaces: true,
namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
volumeDataRestorePolicy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
clusterResourceRestoreScope: {
allGroupKinds: true,
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
restoreOrder: {
groupKindDependencies: [
{
satisfying: {
resourceGroup: "stable.example.com",
resourceKind: "kindA",
},
requiring: {
resourceGroup: "stable.example.com",
resourceKind: "kindB",
},
},
{
satisfying: {
resourceGroup: "stable.example.com",
resourceKind: "kindB",
},
requiring: {
resourceGroup: "stable.example.com",
resourceKind: "kindC",
},
},
],
},
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="restore-order-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="restore-order",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
restore_order = gcp.gkebackup.RestorePlan("restore_order",
name="restore-order",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"all_namespaces": True,
"namespaced_resource_restore_mode": "FAIL_ON_CONFLICT",
"volume_data_restore_policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"cluster_resource_restore_scope": {
"all_group_kinds": True,
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
"restore_order": {
"group_kind_dependencies": [
{
"satisfying": {
"resource_group": "stable.example.com",
"resource_kind": "kindA",
},
"requiring": {
"resource_group": "stable.example.com",
"resource_kind": "kindB",
},
},
{
"satisfying": {
"resource_group": "stable.example.com",
"resource_kind": "kindB",
},
"requiring": {
"resource_group": "stable.example.com",
"resource_kind": "kindC",
},
},
],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("restore-order-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("restore-order"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "restore_order", &gkebackup.RestorePlanArgs{
Name: pulumi.String("restore-order"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
AllNamespaces: pulumi.Bool(true),
NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
VolumeDataRestorePolicy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(true),
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
RestoreOrder: &gkebackup.RestorePlanRestoreConfigRestoreOrderArgs{
GroupKindDependencies: gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArray{
&gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs{
Satisfying: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs{
ResourceGroup: pulumi.String("stable.example.com"),
ResourceKind: pulumi.String("kindA"),
},
Requiring: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs{
ResourceGroup: pulumi.String("stable.example.com"),
ResourceKind: pulumi.String("kindB"),
},
},
&gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs{
Satisfying: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs{
ResourceGroup: pulumi.String("stable.example.com"),
ResourceKind: pulumi.String("kindB"),
},
Requiring: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs{
ResourceGroup: pulumi.String("stable.example.com"),
ResourceKind: pulumi.String("kindC"),
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "restore-order-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "restore-order",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var restoreOrder = new Gcp.GkeBackup.RestorePlan("restore_order", new()
{
Name = "restore-order",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
AllNamespaces = true,
NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
VolumeDataRestorePolicy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = true,
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
RestoreOrder = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderArgs
{
GroupKindDependencies = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs
{
Satisfying = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs
{
ResourceGroup = "stable.example.com",
ResourceKind = "kindA",
},
Requiring = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs
{
ResourceGroup = "stable.example.com",
ResourceKind = "kindB",
},
},
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs
{
Satisfying = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs
{
ResourceGroup = "stable.example.com",
ResourceKind = "kindB",
},
Requiring = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs
{
ResourceGroup = "stable.example.com",
ResourceKind = "kindC",
},
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigRestoreOrderArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("restore-order-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("restore-order")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var restoreOrder = new RestorePlan("restoreOrder", RestorePlanArgs.builder()
.name("restore-order")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.allNamespaces(true)
.namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
.volumeDataRestorePolicy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(true)
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.restoreOrder(RestorePlanRestoreConfigRestoreOrderArgs.builder()
.groupKindDependencies(
RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs.builder()
.satisfying(RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs.builder()
.resourceGroup("stable.example.com")
.resourceKind("kindA")
.build())
.requiring(RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs.builder()
.resourceGroup("stable.example.com")
.resourceKind("kindB")
.build())
.build(),
RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs.builder()
.satisfying(RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs.builder()
.resourceGroup("stable.example.com")
.resourceKind("kindB")
.build())
.requiring(RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs.builder()
.resourceGroup("stable.example.com")
.resourceKind("kindC")
.build())
.build())
.build())
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: restore-order-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: restore-order
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
restoreOrder:
type: gcp:gkebackup:RestorePlan
name: restore_order
properties:
name: restore-order
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
allNamespaces: true
namespacedResourceRestoreMode: FAIL_ON_CONFLICT
volumeDataRestorePolicy: RESTORE_VOLUME_DATA_FROM_BACKUP
clusterResourceRestoreScope:
allGroupKinds: true
clusterResourceConflictPolicy: USE_EXISTING_VERSION
restoreOrder:
groupKindDependencies:
- satisfying:
resourceGroup: stable.example.com
resourceKind: kindA
requiring:
resourceGroup: stable.example.com
resourceKind: kindB
- satisfying:
resourceGroup: stable.example.com
resourceKind: kindB
requiring:
resourceGroup: stable.example.com
resourceKind: kindC
Gkebackup Restoreplan Volume Res
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.container.Cluster("primary", {
name: "volume-res-cluster",
location: "us-central1",
initialNodeCount: 1,
workloadIdentityConfig: {
workloadPool: "my-project-name.svc.id.goog",
},
addonsConfig: {
gkeBackupAgentConfig: {
enabled: true,
},
},
deletionProtection: true,
network: "default",
subnetwork: "default",
});
const basic = new gcp.gkebackup.BackupPlan("basic", {
name: "volume-res",
cluster: primary.id,
location: "us-central1",
backupConfig: {
includeVolumeData: true,
includeSecrets: true,
allNamespaces: true,
},
});
const volumeRes = new gcp.gkebackup.RestorePlan("volume_res", {
name: "volume-res",
location: "us-central1",
backupPlan: basic.id,
cluster: primary.id,
restoreConfig: {
allNamespaces: true,
namespacedResourceRestoreMode: "FAIL_ON_CONFLICT",
volumeDataRestorePolicy: "NO_VOLUME_DATA_RESTORATION",
clusterResourceRestoreScope: {
allGroupKinds: true,
},
clusterResourceConflictPolicy: "USE_EXISTING_VERSION",
volumeDataRestorePolicyBindings: [{
policy: "RESTORE_VOLUME_DATA_FROM_BACKUP",
volumeType: "GCE_PERSISTENT_DISK",
}],
},
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.container.Cluster("primary",
name="volume-res-cluster",
location="us-central1",
initial_node_count=1,
workload_identity_config={
"workload_pool": "my-project-name.svc.id.goog",
},
addons_config={
"gke_backup_agent_config": {
"enabled": True,
},
},
deletion_protection=True,
network="default",
subnetwork="default")
basic = gcp.gkebackup.BackupPlan("basic",
name="volume-res",
cluster=primary.id,
location="us-central1",
backup_config={
"include_volume_data": True,
"include_secrets": True,
"all_namespaces": True,
})
volume_res = gcp.gkebackup.RestorePlan("volume_res",
name="volume-res",
location="us-central1",
backup_plan=basic.id,
cluster=primary.id,
restore_config={
"all_namespaces": True,
"namespaced_resource_restore_mode": "FAIL_ON_CONFLICT",
"volume_data_restore_policy": "NO_VOLUME_DATA_RESTORATION",
"cluster_resource_restore_scope": {
"all_group_kinds": True,
},
"cluster_resource_conflict_policy": "USE_EXISTING_VERSION",
"volume_data_restore_policy_bindings": [{
"policy": "RESTORE_VOLUME_DATA_FROM_BACKUP",
"volume_type": "GCE_PERSISTENT_DISK",
}],
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/container"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/gkebackup"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := container.NewCluster(ctx, "primary", &container.ClusterArgs{
Name: pulumi.String("volume-res-cluster"),
Location: pulumi.String("us-central1"),
InitialNodeCount: pulumi.Int(1),
WorkloadIdentityConfig: &container.ClusterWorkloadIdentityConfigArgs{
WorkloadPool: pulumi.String("my-project-name.svc.id.goog"),
},
AddonsConfig: &container.ClusterAddonsConfigArgs{
GkeBackupAgentConfig: &container.ClusterAddonsConfigGkeBackupAgentConfigArgs{
Enabled: pulumi.Bool(true),
},
},
DeletionProtection: pulumi.Bool(true),
Network: pulumi.String("default"),
Subnetwork: pulumi.String("default"),
})
if err != nil {
return err
}
basic, err := gkebackup.NewBackupPlan(ctx, "basic", &gkebackup.BackupPlanArgs{
Name: pulumi.String("volume-res"),
Cluster: primary.ID(),
Location: pulumi.String("us-central1"),
BackupConfig: &gkebackup.BackupPlanBackupConfigArgs{
IncludeVolumeData: pulumi.Bool(true),
IncludeSecrets: pulumi.Bool(true),
AllNamespaces: pulumi.Bool(true),
},
})
if err != nil {
return err
}
_, err = gkebackup.NewRestorePlan(ctx, "volume_res", &gkebackup.RestorePlanArgs{
Name: pulumi.String("volume-res"),
Location: pulumi.String("us-central1"),
BackupPlan: basic.ID(),
Cluster: primary.ID(),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
AllNamespaces: pulumi.Bool(true),
NamespacedResourceRestoreMode: pulumi.String("FAIL_ON_CONFLICT"),
VolumeDataRestorePolicy: pulumi.String("NO_VOLUME_DATA_RESTORATION"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(true),
},
ClusterResourceConflictPolicy: pulumi.String("USE_EXISTING_VERSION"),
VolumeDataRestorePolicyBindings: gkebackup.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArray{
&gkebackup.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs{
Policy: pulumi.String("RESTORE_VOLUME_DATA_FROM_BACKUP"),
VolumeType: pulumi.String("GCE_PERSISTENT_DISK"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Container.Cluster("primary", new()
{
Name = "volume-res-cluster",
Location = "us-central1",
InitialNodeCount = 1,
WorkloadIdentityConfig = new Gcp.Container.Inputs.ClusterWorkloadIdentityConfigArgs
{
WorkloadPool = "my-project-name.svc.id.goog",
},
AddonsConfig = new Gcp.Container.Inputs.ClusterAddonsConfigArgs
{
GkeBackupAgentConfig = new Gcp.Container.Inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs
{
Enabled = true,
},
},
DeletionProtection = true,
Network = "default",
Subnetwork = "default",
});
var basic = new Gcp.GkeBackup.BackupPlan("basic", new()
{
Name = "volume-res",
Cluster = primary.Id,
Location = "us-central1",
BackupConfig = new Gcp.GkeBackup.Inputs.BackupPlanBackupConfigArgs
{
IncludeVolumeData = true,
IncludeSecrets = true,
AllNamespaces = true,
},
});
var volumeRes = new Gcp.GkeBackup.RestorePlan("volume_res", new()
{
Name = "volume-res",
Location = "us-central1",
BackupPlan = basic.Id,
Cluster = primary.Id,
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
AllNamespaces = true,
NamespacedResourceRestoreMode = "FAIL_ON_CONFLICT",
VolumeDataRestorePolicy = "NO_VOLUME_DATA_RESTORATION",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = true,
},
ClusterResourceConflictPolicy = "USE_EXISTING_VERSION",
VolumeDataRestorePolicyBindings = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs
{
Policy = "RESTORE_VOLUME_DATA_FROM_BACKUP",
VolumeType = "GCE_PERSISTENT_DISK",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.container.Cluster;
import com.pulumi.gcp.container.ClusterArgs;
import com.pulumi.gcp.container.inputs.ClusterWorkloadIdentityConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigArgs;
import com.pulumi.gcp.container.inputs.ClusterAddonsConfigGkeBackupAgentConfigArgs;
import com.pulumi.gcp.gkebackup.BackupPlan;
import com.pulumi.gcp.gkebackup.BackupPlanArgs;
import com.pulumi.gcp.gkebackup.inputs.BackupPlanBackupConfigArgs;
import com.pulumi.gcp.gkebackup.RestorePlan;
import com.pulumi.gcp.gkebackup.RestorePlanArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigArgs;
import com.pulumi.gcp.gkebackup.inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Cluster("primary", ClusterArgs.builder()
.name("volume-res-cluster")
.location("us-central1")
.initialNodeCount(1)
.workloadIdentityConfig(ClusterWorkloadIdentityConfigArgs.builder()
.workloadPool("my-project-name.svc.id.goog")
.build())
.addonsConfig(ClusterAddonsConfigArgs.builder()
.gkeBackupAgentConfig(ClusterAddonsConfigGkeBackupAgentConfigArgs.builder()
.enabled(true)
.build())
.build())
.deletionProtection(true)
.network("default")
.subnetwork("default")
.build());
var basic = new BackupPlan("basic", BackupPlanArgs.builder()
.name("volume-res")
.cluster(primary.id())
.location("us-central1")
.backupConfig(BackupPlanBackupConfigArgs.builder()
.includeVolumeData(true)
.includeSecrets(true)
.allNamespaces(true)
.build())
.build());
var volumeRes = new RestorePlan("volumeRes", RestorePlanArgs.builder()
.name("volume-res")
.location("us-central1")
.backupPlan(basic.id())
.cluster(primary.id())
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.allNamespaces(true)
.namespacedResourceRestoreMode("FAIL_ON_CONFLICT")
.volumeDataRestorePolicy("NO_VOLUME_DATA_RESTORATION")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(true)
.build())
.clusterResourceConflictPolicy("USE_EXISTING_VERSION")
.volumeDataRestorePolicyBindings(RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs.builder()
.policy("RESTORE_VOLUME_DATA_FROM_BACKUP")
.volumeType("GCE_PERSISTENT_DISK")
.build())
.build())
.build());
}
}
resources:
primary:
type: gcp:container:Cluster
properties:
name: volume-res-cluster
location: us-central1
initialNodeCount: 1
workloadIdentityConfig:
workloadPool: my-project-name.svc.id.goog
addonsConfig:
gkeBackupAgentConfig:
enabled: true
deletionProtection: true
network: default
subnetwork: default
basic:
type: gcp:gkebackup:BackupPlan
properties:
name: volume-res
cluster: ${primary.id}
location: us-central1
backupConfig:
includeVolumeData: true
includeSecrets: true
allNamespaces: true
volumeRes:
type: gcp:gkebackup:RestorePlan
name: volume_res
properties:
name: volume-res
location: us-central1
backupPlan: ${basic.id}
cluster: ${primary.id}
restoreConfig:
allNamespaces: true
namespacedResourceRestoreMode: FAIL_ON_CONFLICT
volumeDataRestorePolicy: NO_VOLUME_DATA_RESTORATION
clusterResourceRestoreScope:
allGroupKinds: true
clusterResourceConflictPolicy: USE_EXISTING_VERSION
volumeDataRestorePolicyBindings:
- policy: RESTORE_VOLUME_DATA_FROM_BACKUP
volumeType: GCE_PERSISTENT_DISK
Create RestorePlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RestorePlan(name: string, args: RestorePlanArgs, opts?: CustomResourceOptions);
@overload
def RestorePlan(resource_name: str,
args: RestorePlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RestorePlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_plan: Optional[str] = None,
cluster: Optional[str] = None,
location: Optional[str] = None,
restore_config: Optional[RestorePlanRestoreConfigArgs] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewRestorePlan(ctx *Context, name string, args RestorePlanArgs, opts ...ResourceOption) (*RestorePlan, error)
public RestorePlan(string name, RestorePlanArgs args, CustomResourceOptions? opts = null)
public RestorePlan(String name, RestorePlanArgs args)
public RestorePlan(String name, RestorePlanArgs args, CustomResourceOptions options)
type: gcp:gkebackup:RestorePlan
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RestorePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RestorePlanArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RestorePlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RestorePlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RestorePlanArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var restorePlanResource = new Gcp.GkeBackup.RestorePlan("restorePlanResource", new()
{
BackupPlan = "string",
Cluster = "string",
Location = "string",
RestoreConfig = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigArgs
{
AllNamespaces = false,
ClusterResourceConflictPolicy = "string",
ClusterResourceRestoreScope = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
{
AllGroupKinds = false,
ExcludedGroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs
{
ResourceGroup = "string",
ResourceKind = "string",
},
},
NoGroupKinds = false,
SelectedGroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
{
ResourceGroup = "string",
ResourceKind = "string",
},
},
},
ExcludedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigExcludedNamespacesArgs
{
Namespaces = new[]
{
"string",
},
},
NamespacedResourceRestoreMode = "string",
NoNamespaces = false,
RestoreOrder = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderArgs
{
GroupKindDependencies = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs
{
Requiring = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs
{
ResourceGroup = "string",
ResourceKind = "string",
},
Satisfying = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs
{
ResourceGroup = "string",
ResourceKind = "string",
},
},
},
},
SelectedApplications = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsArgs
{
NamespacedNames = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs
{
Name = "string",
Namespace = "string",
},
},
},
SelectedNamespaces = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigSelectedNamespacesArgs
{
Namespaces = new[]
{
"string",
},
},
TransformationRules = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleArgs
{
FieldActions = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleFieldActionArgs
{
Op = "string",
FromPath = "string",
Path = "string",
Value = "string",
},
},
Description = "string",
ResourceFilter = new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
{
GroupKinds = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
{
ResourceGroup = "string",
ResourceKind = "string",
},
},
JsonPath = "string",
Namespaces = new[]
{
"string",
},
},
},
},
VolumeDataRestorePolicy = "string",
VolumeDataRestorePolicyBindings = new[]
{
new Gcp.GkeBackup.Inputs.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs
{
Policy = "string",
VolumeType = "string",
},
},
},
Description = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
Project = "string",
});
example, err := gkebackup.NewRestorePlan(ctx, "restorePlanResource", &gkebackup.RestorePlanArgs{
BackupPlan: pulumi.String("string"),
Cluster: pulumi.String("string"),
Location: pulumi.String("string"),
RestoreConfig: &gkebackup.RestorePlanRestoreConfigArgs{
AllNamespaces: pulumi.Bool(false),
ClusterResourceConflictPolicy: pulumi.String("string"),
ClusterResourceRestoreScope: &gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeArgs{
AllGroupKinds: pulumi.Bool(false),
ExcludedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArray{
&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs{
ResourceGroup: pulumi.String("string"),
ResourceKind: pulumi.String("string"),
},
},
NoGroupKinds: pulumi.Bool(false),
SelectedGroupKinds: gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArray{
&gkebackup.RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs{
ResourceGroup: pulumi.String("string"),
ResourceKind: pulumi.String("string"),
},
},
},
ExcludedNamespaces: &gkebackup.RestorePlanRestoreConfigExcludedNamespacesArgs{
Namespaces: pulumi.StringArray{
pulumi.String("string"),
},
},
NamespacedResourceRestoreMode: pulumi.String("string"),
NoNamespaces: pulumi.Bool(false),
RestoreOrder: &gkebackup.RestorePlanRestoreConfigRestoreOrderArgs{
GroupKindDependencies: gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArray{
&gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs{
Requiring: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs{
ResourceGroup: pulumi.String("string"),
ResourceKind: pulumi.String("string"),
},
Satisfying: &gkebackup.RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs{
ResourceGroup: pulumi.String("string"),
ResourceKind: pulumi.String("string"),
},
},
},
},
SelectedApplications: &gkebackup.RestorePlanRestoreConfigSelectedApplicationsArgs{
NamespacedNames: gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArray{
&gkebackup.RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs{
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
},
},
},
SelectedNamespaces: &gkebackup.RestorePlanRestoreConfigSelectedNamespacesArgs{
Namespaces: pulumi.StringArray{
pulumi.String("string"),
},
},
TransformationRules: gkebackup.RestorePlanRestoreConfigTransformationRuleArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleArgs{
FieldActions: gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleFieldActionArgs{
Op: pulumi.String("string"),
FromPath: pulumi.String("string"),
Path: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
ResourceFilter: &gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterArgs{
GroupKinds: gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArray{
&gkebackup.RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs{
ResourceGroup: pulumi.String("string"),
ResourceKind: pulumi.String("string"),
},
},
JsonPath: pulumi.String("string"),
Namespaces: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
VolumeDataRestorePolicy: pulumi.String("string"),
VolumeDataRestorePolicyBindings: gkebackup.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArray{
&gkebackup.RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs{
Policy: pulumi.String("string"),
VolumeType: pulumi.String("string"),
},
},
},
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var restorePlanResource = new RestorePlan("restorePlanResource", RestorePlanArgs.builder()
.backupPlan("string")
.cluster("string")
.location("string")
.restoreConfig(RestorePlanRestoreConfigArgs.builder()
.allNamespaces(false)
.clusterResourceConflictPolicy("string")
.clusterResourceRestoreScope(RestorePlanRestoreConfigClusterResourceRestoreScopeArgs.builder()
.allGroupKinds(false)
.excludedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs.builder()
.resourceGroup("string")
.resourceKind("string")
.build())
.noGroupKinds(false)
.selectedGroupKinds(RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs.builder()
.resourceGroup("string")
.resourceKind("string")
.build())
.build())
.excludedNamespaces(RestorePlanRestoreConfigExcludedNamespacesArgs.builder()
.namespaces("string")
.build())
.namespacedResourceRestoreMode("string")
.noNamespaces(false)
.restoreOrder(RestorePlanRestoreConfigRestoreOrderArgs.builder()
.groupKindDependencies(RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs.builder()
.requiring(RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs.builder()
.resourceGroup("string")
.resourceKind("string")
.build())
.satisfying(RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs.builder()
.resourceGroup("string")
.resourceKind("string")
.build())
.build())
.build())
.selectedApplications(RestorePlanRestoreConfigSelectedApplicationsArgs.builder()
.namespacedNames(RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs.builder()
.name("string")
.namespace("string")
.build())
.build())
.selectedNamespaces(RestorePlanRestoreConfigSelectedNamespacesArgs.builder()
.namespaces("string")
.build())
.transformationRules(RestorePlanRestoreConfigTransformationRuleArgs.builder()
.fieldActions(RestorePlanRestoreConfigTransformationRuleFieldActionArgs.builder()
.op("string")
.fromPath("string")
.path("string")
.value("string")
.build())
.description("string")
.resourceFilter(RestorePlanRestoreConfigTransformationRuleResourceFilterArgs.builder()
.groupKinds(RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs.builder()
.resourceGroup("string")
.resourceKind("string")
.build())
.jsonPath("string")
.namespaces("string")
.build())
.build())
.volumeDataRestorePolicy("string")
.volumeDataRestorePolicyBindings(RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs.builder()
.policy("string")
.volumeType("string")
.build())
.build())
.description("string")
.labels(Map.of("string", "string"))
.name("string")
.project("string")
.build());
restore_plan_resource = gcp.gkebackup.RestorePlan("restorePlanResource",
backup_plan="string",
cluster="string",
location="string",
restore_config={
"all_namespaces": False,
"cluster_resource_conflict_policy": "string",
"cluster_resource_restore_scope": {
"all_group_kinds": False,
"excluded_group_kinds": [{
"resource_group": "string",
"resource_kind": "string",
}],
"no_group_kinds": False,
"selected_group_kinds": [{
"resource_group": "string",
"resource_kind": "string",
}],
},
"excluded_namespaces": {
"namespaces": ["string"],
},
"namespaced_resource_restore_mode": "string",
"no_namespaces": False,
"restore_order": {
"group_kind_dependencies": [{
"requiring": {
"resource_group": "string",
"resource_kind": "string",
},
"satisfying": {
"resource_group": "string",
"resource_kind": "string",
},
}],
},
"selected_applications": {
"namespaced_names": [{
"name": "string",
"namespace": "string",
}],
},
"selected_namespaces": {
"namespaces": ["string"],
},
"transformation_rules": [{
"field_actions": [{
"op": "string",
"from_path": "string",
"path": "string",
"value": "string",
}],
"description": "string",
"resource_filter": {
"group_kinds": [{
"resource_group": "string",
"resource_kind": "string",
}],
"json_path": "string",
"namespaces": ["string"],
},
}],
"volume_data_restore_policy": "string",
"volume_data_restore_policy_bindings": [{
"policy": "string",
"volume_type": "string",
}],
},
description="string",
labels={
"string": "string",
},
name="string",
project="string")
const restorePlanResource = new gcp.gkebackup.RestorePlan("restorePlanResource", {
backupPlan: "string",
cluster: "string",
location: "string",
restoreConfig: {
allNamespaces: false,
clusterResourceConflictPolicy: "string",
clusterResourceRestoreScope: {
allGroupKinds: false,
excludedGroupKinds: [{
resourceGroup: "string",
resourceKind: "string",
}],
noGroupKinds: false,
selectedGroupKinds: [{
resourceGroup: "string",
resourceKind: "string",
}],
},
excludedNamespaces: {
namespaces: ["string"],
},
namespacedResourceRestoreMode: "string",
noNamespaces: false,
restoreOrder: {
groupKindDependencies: [{
requiring: {
resourceGroup: "string",
resourceKind: "string",
},
satisfying: {
resourceGroup: "string",
resourceKind: "string",
},
}],
},
selectedApplications: {
namespacedNames: [{
name: "string",
namespace: "string",
}],
},
selectedNamespaces: {
namespaces: ["string"],
},
transformationRules: [{
fieldActions: [{
op: "string",
fromPath: "string",
path: "string",
value: "string",
}],
description: "string",
resourceFilter: {
groupKinds: [{
resourceGroup: "string",
resourceKind: "string",
}],
jsonPath: "string",
namespaces: ["string"],
},
}],
volumeDataRestorePolicy: "string",
volumeDataRestorePolicyBindings: [{
policy: "string",
volumeType: "string",
}],
},
description: "string",
labels: {
string: "string",
},
name: "string",
project: "string",
});
type: gcp:gkebackup:RestorePlan
properties:
backupPlan: string
cluster: string
description: string
labels:
string: string
location: string
name: string
project: string
restoreConfig:
allNamespaces: false
clusterResourceConflictPolicy: string
clusterResourceRestoreScope:
allGroupKinds: false
excludedGroupKinds:
- resourceGroup: string
resourceKind: string
noGroupKinds: false
selectedGroupKinds:
- resourceGroup: string
resourceKind: string
excludedNamespaces:
namespaces:
- string
namespacedResourceRestoreMode: string
noNamespaces: false
restoreOrder:
groupKindDependencies:
- requiring:
resourceGroup: string
resourceKind: string
satisfying:
resourceGroup: string
resourceKind: string
selectedApplications:
namespacedNames:
- name: string
namespace: string
selectedNamespaces:
namespaces:
- string
transformationRules:
- description: string
fieldActions:
- fromPath: string
op: string
path: string
value: string
resourceFilter:
groupKinds:
- resourceGroup: string
resourceKind: string
jsonPath: string
namespaces:
- string
volumeDataRestorePolicy: string
volumeDataRestorePolicyBindings:
- policy: string
volumeType: string
RestorePlan Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RestorePlan resource accepts the following input properties:
- Backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- Cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- Location string
- The region of the Restore Plan.
- Restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- Description string
- User specified descriptive string for this RestorePlan.
- Labels Dictionary<string, string>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Name string
- The full name of the BackupPlan Resource.
- Project string
- Backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- Cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- Location string
- The region of the Restore Plan.
- Restore
Config RestorePlan Restore Config Args - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- Description string
- User specified descriptive string for this RestorePlan.
- Labels map[string]string
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Name string
- The full name of the BackupPlan Resource.
- Project string
- backup
Plan String - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster String
- The source cluster from which Restores will be created via this RestorePlan.
- location String
- The region of the Restore Plan.
- restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- description String
- User specified descriptive string for this RestorePlan.
- labels Map<String,String>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name String
- The full name of the BackupPlan Resource.
- project String
- backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- location string
- The region of the Restore Plan.
- restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- description string
- User specified descriptive string for this RestorePlan.
- labels {[key: string]: string}
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name string
- The full name of the BackupPlan Resource.
- project string
- backup_
plan str - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster str
- The source cluster from which Restores will be created via this RestorePlan.
- location str
- The region of the Restore Plan.
- restore_
config RestorePlan Restore Config Args - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- description str
- User specified descriptive string for this RestorePlan.
- labels Mapping[str, str]
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name str
- The full name of the BackupPlan Resource.
- project str
- backup
Plan String - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster String
- The source cluster from which Restores will be created via this RestorePlan.
- location String
- The region of the Restore Plan.
- restore
Config Property Map - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- description String
- User specified descriptive string for this RestorePlan.
- labels Map<String>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name String
- The full name of the BackupPlan Resource.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the RestorePlan resource produces the following output properties:
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- The State of the RestorePlan.
- State
Reason string - Detailed description of why RestorePlan is in its current state.
- Uid string
- Server generated, unique identifier of UUID format.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- The State of the RestorePlan.
- State
Reason string - Detailed description of why RestorePlan is in its current state.
- Uid string
- Server generated, unique identifier of UUID format.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- The State of the RestorePlan.
- state
Reason String - Detailed description of why RestorePlan is in its current state.
- uid String
- Server generated, unique identifier of UUID format.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- The State of the RestorePlan.
- state
Reason string - Detailed description of why RestorePlan is in its current state.
- uid string
- Server generated, unique identifier of UUID format.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- state str
- The State of the RestorePlan.
- state_
reason str - Detailed description of why RestorePlan is in its current state.
- uid str
- Server generated, unique identifier of UUID format.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- The State of the RestorePlan.
- state
Reason String - Detailed description of why RestorePlan is in its current state.
- uid String
- Server generated, unique identifier of UUID format.
Look up Existing RestorePlan Resource
Get an existing RestorePlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RestorePlanState, opts?: CustomResourceOptions): RestorePlan
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_plan: Optional[str] = None,
cluster: Optional[str] = None,
description: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
restore_config: Optional[RestorePlanRestoreConfigArgs] = None,
state: Optional[str] = None,
state_reason: Optional[str] = None,
uid: Optional[str] = None) -> RestorePlan
func GetRestorePlan(ctx *Context, name string, id IDInput, state *RestorePlanState, opts ...ResourceOption) (*RestorePlan, error)
public static RestorePlan Get(string name, Input<string> id, RestorePlanState? state, CustomResourceOptions? opts = null)
public static RestorePlan get(String name, Output<String> id, RestorePlanState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- Cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- Description string
- User specified descriptive string for this RestorePlan.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels Dictionary<string, string>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Location string
- The region of the Restore Plan.
- Name string
- The full name of the BackupPlan Resource.
- Project string
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- State string
- The State of the RestorePlan.
- State
Reason string - Detailed description of why RestorePlan is in its current state.
- Uid string
- Server generated, unique identifier of UUID format.
- Backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- Cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- Description string
- User specified descriptive string for this RestorePlan.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Labels map[string]string
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Location string
- The region of the Restore Plan.
- Name string
- The full name of the BackupPlan Resource.
- Project string
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Restore
Config RestorePlan Restore Config Args - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- State string
- The State of the RestorePlan.
- State
Reason string - Detailed description of why RestorePlan is in its current state.
- Uid string
- Server generated, unique identifier of UUID format.
- backup
Plan String - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster String
- The source cluster from which Restores will be created via this RestorePlan.
- description String
- User specified descriptive string for this RestorePlan.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String,String>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- location String
- The region of the Restore Plan.
- name String
- The full name of the BackupPlan Resource.
- project String
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- state String
- The State of the RestorePlan.
- state
Reason String - Detailed description of why RestorePlan is in its current state.
- uid String
- Server generated, unique identifier of UUID format.
- backup
Plan string - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster string
- The source cluster from which Restores will be created via this RestorePlan.
- description string
- User specified descriptive string for this RestorePlan.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels {[key: string]: string}
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- location string
- The region of the Restore Plan.
- name string
- The full name of the BackupPlan Resource.
- project string
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- restore
Config RestorePlan Restore Config - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- state string
- The State of the RestorePlan.
- state
Reason string - Detailed description of why RestorePlan is in its current state.
- uid string
- Server generated, unique identifier of UUID format.
- backup_
plan str - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster str
- The source cluster from which Restores will be created via this RestorePlan.
- description str
- User specified descriptive string for this RestorePlan.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Mapping[str, str]
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- location str
- The region of the Restore Plan.
- name str
- The full name of the BackupPlan Resource.
- project str
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- restore_
config RestorePlan Restore Config Args - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- state str
- The State of the RestorePlan.
- state_
reason str - Detailed description of why RestorePlan is in its current state.
- uid str
- Server generated, unique identifier of UUID format.
- backup
Plan String - A reference to the BackupPlan from which Backups may be used as the source for Restores created via this RestorePlan.
- cluster String
- The source cluster from which Restores will be created via this RestorePlan.
- description String
- User specified descriptive string for this RestorePlan.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- labels Map<String>
- Description: A set of custom labels supplied by the user. A list of key->value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- location String
- The region of the Restore Plan.
- name String
- The full name of the BackupPlan Resource.
- project String
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- restore
Config Property Map - Defines the configuration of Restores created via this RestorePlan. Structure is documented below.
- state String
- The State of the RestorePlan.
- state
Reason String - Detailed description of why RestorePlan is in its current state.
- uid String
- Server generated, unique identifier of UUID format.
Supporting Types
RestorePlanRestoreConfig, RestorePlanRestoreConfigArgs
- All
Namespaces bool - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- Cluster
Resource stringConflict Policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - Cluster
Resource RestoreRestore Scope Plan Restore Config Cluster Resource Restore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- Excluded
Namespaces RestorePlan Restore Config Excluded Namespaces - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- Namespaced
Resource stringRestore Mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - No
Namespaces bool - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- Restore
Order RestorePlan Restore Config Restore Order - It contains custom ordering to use on a Restore. Structure is documented below.
- Selected
Applications RestorePlan Restore Config Selected Applications - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- Selected
Namespaces RestorePlan Restore Config Selected Namespaces - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- Transformation
Rules List<RestorePlan Restore Config Transformation Rule> - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- Volume
Data stringRestore Policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - Volume
Data List<RestoreRestore Policy Bindings Plan Restore Config Volume Data Restore Policy Binding> - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
- All
Namespaces bool - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- Cluster
Resource stringConflict Policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - Cluster
Resource RestoreRestore Scope Plan Restore Config Cluster Resource Restore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- Excluded
Namespaces RestorePlan Restore Config Excluded Namespaces - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- Namespaced
Resource stringRestore Mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - No
Namespaces bool - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- Restore
Order RestorePlan Restore Config Restore Order - It contains custom ordering to use on a Restore. Structure is documented below.
- Selected
Applications RestorePlan Restore Config Selected Applications - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- Selected
Namespaces RestorePlan Restore Config Selected Namespaces - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- Transformation
Rules []RestorePlan Restore Config Transformation Rule - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- Volume
Data stringRestore Policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - Volume
Data []RestoreRestore Policy Bindings Plan Restore Config Volume Data Restore Policy Binding - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
- all
Namespaces Boolean - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- cluster
Resource StringConflict Policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - cluster
Resource RestoreRestore Scope Plan Restore Config Cluster Resource Restore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- excluded
Namespaces RestorePlan Restore Config Excluded Namespaces - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- namespaced
Resource StringRestore Mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - no
Namespaces Boolean - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- restore
Order RestorePlan Restore Config Restore Order - It contains custom ordering to use on a Restore. Structure is documented below.
- selected
Applications RestorePlan Restore Config Selected Applications - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- selected
Namespaces RestorePlan Restore Config Selected Namespaces - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- transformation
Rules List<RestorePlan Restore Config Transformation Rule> - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- volume
Data StringRestore Policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Data List<RestoreRestore Policy Bindings Plan Restore Config Volume Data Restore Policy Binding> - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
- all
Namespaces boolean - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- cluster
Resource stringConflict Policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - cluster
Resource RestoreRestore Scope Plan Restore Config Cluster Resource Restore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- excluded
Namespaces RestorePlan Restore Config Excluded Namespaces - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- namespaced
Resource stringRestore Mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - no
Namespaces boolean - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- restore
Order RestorePlan Restore Config Restore Order - It contains custom ordering to use on a Restore. Structure is documented below.
- selected
Applications RestorePlan Restore Config Selected Applications - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- selected
Namespaces RestorePlan Restore Config Selected Namespaces - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- transformation
Rules RestorePlan Restore Config Transformation Rule[] - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- volume
Data stringRestore Policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Data RestoreRestore Policy Bindings Plan Restore Config Volume Data Restore Policy Binding[] - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
- all_
namespaces bool - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- cluster_
resource_ strconflict_ policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - cluster_
resource_ Restorerestore_ scope Plan Restore Config Cluster Resource Restore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- excluded_
namespaces RestorePlan Restore Config Excluded Namespaces - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- namespaced_
resource_ strrestore_ mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - no_
namespaces bool - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- restore_
order RestorePlan Restore Config Restore Order - It contains custom ordering to use on a Restore. Structure is documented below.
- selected_
applications RestorePlan Restore Config Selected Applications - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- selected_
namespaces RestorePlan Restore Config Selected Namespaces - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- transformation_
rules Sequence[RestorePlan Restore Config Transformation Rule] - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- volume_
data_ strrestore_ policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume_
data_ Sequence[Restorerestore_ policy_ bindings Plan Restore Config Volume Data Restore Policy Binding] - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
- all
Namespaces Boolean - If True, restore all namespaced resources in the Backup. Setting this field to False will result in an error.
- cluster
Resource StringConflict Policy - Defines the behavior for handling the situation where cluster-scoped resources
being restored already exist in the target cluster.
This MUST be set to a value other than
CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED
ifclusterResourceRestoreScope
is anyting other thannoGroupKinds
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#clusterresourceconflictpolicy for more information on each policy option. Possible values are:USE_EXISTING_VERSION
,USE_BACKUP_VERSION
. - cluster
Resource Property MapRestore Scope - Identifies the cluster-scoped resources to restore from the Backup. Structure is documented below.
- excluded
Namespaces Property Map - A list of selected namespaces excluded from restoration. All namespaces except those in this list will be restored. Structure is documented below.
- namespaced
Resource StringRestore Mode - Defines the behavior for handling the situation where sets of namespaced resources
being restored already exist in the target cluster.
This MUST be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#namespacedresourcerestoremode for more information on each mode. Possible values are:DELETE_AND_RESTORE
,FAIL_ON_CONFLICT
,MERGE_SKIP_ON_CONFLICT
,MERGE_REPLACE_VOLUME_ON_CONFLICT
,MERGE_REPLACE_ON_CONFLICT
. - no
Namespaces Boolean - Do not restore any namespaced resources if set to "True". Specifying this field to "False" is not allowed.
- restore
Order Property Map - It contains custom ordering to use on a Restore. Structure is documented below.
- selected
Applications Property Map - A list of selected ProtectedApplications to restore. The listed ProtectedApplications and all the resources to which they refer will be restored. Structure is documented below.
- selected
Namespaces Property Map - A list of selected namespaces to restore from the Backup. The listed Namespaces and all resources contained in them will be restored. Structure is documented below.
- transformation
Rules List<Property Map> - A list of transformation rules to be applied against Kubernetes resources as they are selected for restoration from a Backup. Rules are executed in order defined - this order matters, as changes made by a rule may impact the filtering logic of subsequent rules. An empty list means no transformation will occur. Structure is documented below.
- volume
Data StringRestore Policy - Specifies the mechanism to be used to restore volume data.
This should be set to a value other than
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
if thenamespacedResourceRestoreScope
is anything other thannoNamespaces
. If not specified, it will be treated asNO_VOLUME_DATA_RESTORATION
. See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy for more information on each policy option. Possible values are:RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Data List<Property Map>Restore Policy Bindings - A table that binds volumes by their scope to a restore policy. Bindings must have a unique scope. Any volumes not scoped in the bindings are subject to the policy defined in volume_data_restore_policy. Structure is documented below.
RestorePlanRestoreConfigClusterResourceRestoreScope, RestorePlanRestoreConfigClusterResourceRestoreScopeArgs
- All
Group boolKinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - Excluded
Group List<RestoreKinds Plan Restore Config Cluster Resource Restore Scope Excluded Group Kind> - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - No
Group boolKinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - Selected
Group List<RestoreKinds Plan Restore Config Cluster Resource Restore Scope Selected Group Kind> - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
- All
Group boolKinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - Excluded
Group []RestoreKinds Plan Restore Config Cluster Resource Restore Scope Excluded Group Kind - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - No
Group boolKinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - Selected
Group []RestoreKinds Plan Restore Config Cluster Resource Restore Scope Selected Group Kind - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
- all
Group BooleanKinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - excluded
Group List<RestoreKinds Plan Restore Config Cluster Resource Restore Scope Excluded Group Kind> - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - no
Group BooleanKinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - selected
Group List<RestoreKinds Plan Restore Config Cluster Resource Restore Scope Selected Group Kind> - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
- all
Group booleanKinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - excluded
Group RestoreKinds Plan Restore Config Cluster Resource Restore Scope Excluded Group Kind[] - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - no
Group booleanKinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - selected
Group RestoreKinds Plan Restore Config Cluster Resource Restore Scope Selected Group Kind[] - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
- all_
group_ boolkinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - excluded_
group_ Sequence[Restorekinds Plan Restore Config Cluster Resource Restore Scope Excluded Group Kind] - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - no_
group_ boolkinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - selected_
group_ Sequence[Restorekinds Plan Restore Config Cluster Resource Restore Scope Selected Group Kind] - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
- all
Group BooleanKinds - If True, all valid cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - excluded
Group List<Property Map>Kinds - A list of cluster-scoped resource group kinds to NOT restore from the backup.
If specified, all valid cluster-scoped resources will be restored except
for those specified in the list.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. Structure is documented below. - no
Group BooleanKinds - If True, no cluster-scoped resources will be restored.
Mutually exclusive to any other field in
clusterResourceRestoreScope
. - selected
Group List<Property Map>Kinds - A list of cluster-scoped resource group kinds to restore from the backup.
If specified, only the selected resources will be restored.
Mutually exclusive to any other field in the
clusterResourceRestoreScope
. Structure is documented below.
RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKind, RestorePlanRestoreConfigClusterResourceRestoreScopeExcludedGroupKindArgs
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource_
group str - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource_
kind str - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKind, RestorePlanRestoreConfigClusterResourceRestoreScopeSelectedGroupKindArgs
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource_
group str - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource_
kind str - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
RestorePlanRestoreConfigExcludedNamespaces, RestorePlanRestoreConfigExcludedNamespacesArgs
- Namespaces List<string>
- A list of Kubernetes Namespaces.
- Namespaces []string
- A list of Kubernetes Namespaces.
- namespaces List<String>
- A list of Kubernetes Namespaces.
- namespaces string[]
- A list of Kubernetes Namespaces.
- namespaces Sequence[str]
- A list of Kubernetes Namespaces.
- namespaces List<String>
- A list of Kubernetes Namespaces.
RestorePlanRestoreConfigRestoreOrder, RestorePlanRestoreConfigRestoreOrderArgs
- Group
Kind List<RestoreDependencies Plan Restore Config Restore Order Group Kind Dependency> - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
- Group
Kind []RestoreDependencies Plan Restore Config Restore Order Group Kind Dependency - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
- group
Kind List<RestoreDependencies Plan Restore Config Restore Order Group Kind Dependency> - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
- group
Kind RestoreDependencies Plan Restore Config Restore Order Group Kind Dependency[] - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
- group_
kind_ Sequence[Restoredependencies Plan Restore Config Restore Order Group Kind Dependency] - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
- group
Kind List<Property Map>Dependencies - A list of group kind dependency pairs that is used by Backup for GKE to generate a group kind restore order. Structure is documented below.
RestorePlanRestoreConfigRestoreOrderGroupKindDependency, RestorePlanRestoreConfigRestoreOrderGroupKindDependencyArgs
- Requiring
Restore
Plan Restore Config Restore Order Group Kind Dependency Requiring - The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- Satisfying
Restore
Plan Restore Config Restore Order Group Kind Dependency Satisfying - The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
- Requiring
Restore
Plan Restore Config Restore Order Group Kind Dependency Requiring - The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- Satisfying
Restore
Plan Restore Config Restore Order Group Kind Dependency Satisfying - The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
- requiring
Restore
Plan Restore Config Restore Order Group Kind Dependency Requiring - The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- satisfying
Restore
Plan Restore Config Restore Order Group Kind Dependency Satisfying - The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
- requiring
Restore
Plan Restore Config Restore Order Group Kind Dependency Requiring - The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- satisfying
Restore
Plan Restore Config Restore Order Group Kind Dependency Satisfying - The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
- requiring
Restore
Plan Restore Config Restore Order Group Kind Dependency Requiring - The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- satisfying
Restore
Plan Restore Config Restore Order Group Kind Dependency Satisfying - The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
- requiring Property Map
- The requiring group kind requires that the satisfying group kind be restored first. Structure is documented below.
- satisfying Property Map
- The satisfying group kind must be restored first in order to satisfy the dependency. Structure is documented below.
RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiring, RestorePlanRestoreConfigRestoreOrderGroupKindDependencyRequiringArgs
- Resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
- Resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
- resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind string - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
- resource_
group str - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource_
kind str - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g.
"CustomResourceDefinition", "StorageClass", etc.
RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfying, RestorePlanRestoreConfigRestoreOrderGroupKindDependencySatisfyingArgs
- Resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- Resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group string - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource_
group str - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource_
kind str - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
RestorePlanRestoreConfigSelectedApplications, RestorePlanRestoreConfigSelectedApplicationsArgs
- Namespaced
Names List<RestorePlan Restore Config Selected Applications Namespaced Name> - A list of namespaced Kubernetes resources. Structure is documented below.
- Namespaced
Names []RestorePlan Restore Config Selected Applications Namespaced Name - A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced
Names List<RestorePlan Restore Config Selected Applications Namespaced Name> - A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced
Names RestorePlan Restore Config Selected Applications Namespaced Name[] - A list of namespaced Kubernetes resources. Structure is documented below.
- namespaced_
names Sequence[RestorePlan Restore 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.
RestorePlanRestoreConfigSelectedApplicationsNamespacedName, RestorePlanRestoreConfigSelectedApplicationsNamespacedNameArgs
RestorePlanRestoreConfigSelectedNamespaces, RestorePlanRestoreConfigSelectedNamespacesArgs
- Namespaces List<string>
- A list of Kubernetes Namespaces.
- Namespaces []string
- A list of Kubernetes Namespaces.
- namespaces List<String>
- A list of Kubernetes Namespaces.
- namespaces string[]
- A list of Kubernetes Namespaces.
- namespaces Sequence[str]
- A list of Kubernetes Namespaces.
- namespaces List<String>
- A list of Kubernetes Namespaces.
RestorePlanRestoreConfigTransformationRule, RestorePlanRestoreConfigTransformationRuleArgs
- Field
Actions List<RestorePlan Restore Config Transformation Rule Field Action> - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- Description string
- The description is a user specified string description of the transformation rule.
- Resource
Filter RestorePlan Restore Config Transformation Rule Resource Filter - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
- Field
Actions []RestorePlan Restore Config Transformation Rule Field Action - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- Description string
- The description is a user specified string description of the transformation rule.
- Resource
Filter RestorePlan Restore Config Transformation Rule Resource Filter - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
- field
Actions List<RestorePlan Restore Config Transformation Rule Field Action> - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- description String
- The description is a user specified string description of the transformation rule.
- resource
Filter RestorePlan Restore Config Transformation Rule Resource Filter - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
- field
Actions RestorePlan Restore Config Transformation Rule Field Action[] - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- description string
- The description is a user specified string description of the transformation rule.
- resource
Filter RestorePlan Restore Config Transformation Rule Resource Filter - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
- field_
actions Sequence[RestorePlan Restore Config Transformation Rule Field Action] - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- description str
- The description is a user specified string description of the transformation rule.
- resource_
filter RestorePlan Restore Config Transformation Rule Resource Filter - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
- field
Actions List<Property Map> - A list of transformation rule actions to take against candidate resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. Structure is documented below.
- description String
- The description is a user specified string description of the transformation rule.
- resource
Filter Property Map - This field is used to specify a set of fields that should be used to determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. Structure is documented below.
RestorePlanRestoreConfigTransformationRuleFieldAction, RestorePlanRestoreConfigTransformationRuleFieldActionArgs
- Op string
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - From
Path string - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- Path string
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- Value string
- A string that specifies the desired value in string format to use for transformation.
- Op string
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - From
Path string - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- Path string
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- Value string
- A string that specifies the desired value in string format to use for transformation.
- op String
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - from
Path String - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- path String
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- value String
- A string that specifies the desired value in string format to use for transformation.
- op string
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - from
Path string - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- path string
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- value string
- A string that specifies the desired value in string format to use for transformation.
- op str
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - from_
path str - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- path str
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- value str
- A string that specifies the desired value in string format to use for transformation.
- op String
- Specifies the operation to perform.
Possible values are:
REMOVE
,MOVE
,COPY
,ADD
,TEST
,REPLACE
. - from
Path String - A string containing a JSON Pointer value that references the location in the target document to move the value from.
- path String
- A string containing a JSON-Pointer value that references a location within the target document where the operation is performed.
- value String
- A string that specifies the desired value in string format to use for transformation.
RestorePlanRestoreConfigTransformationRuleResourceFilter, RestorePlanRestoreConfigTransformationRuleResourceFilterArgs
- Group
Kinds List<RestorePlan Restore Config Transformation Rule Resource Filter Group Kind> - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- Json
Path string - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- Namespaces List<string>
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
- Group
Kinds []RestorePlan Restore Config Transformation Rule Resource Filter Group Kind - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- Json
Path string - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- Namespaces []string
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
- group
Kinds List<RestorePlan Restore Config Transformation Rule Resource Filter Group Kind> - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- json
Path String - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- namespaces List<String>
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
- group
Kinds RestorePlan Restore Config Transformation Rule Resource Filter Group Kind[] - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- json
Path string - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- namespaces string[]
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
- group_
kinds Sequence[RestorePlan Restore Config Transformation Rule Resource Filter Group Kind] - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- json_
path str - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- namespaces Sequence[str]
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
- group
Kinds List<Property Map> - (Filtering parameter) Any resource subject to transformation must belong to one of the listed "types". If this field is not provided, no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). Structure is documented below.
- json
Path String - This is a JSONPath expression that matches specific fields of candidate resources and it operates as a filtering parameter (resources that are not matched with this expression will not be candidates for transformation).
- namespaces List<String>
- (Filtering parameter) Any resource subject to transformation must be contained within one of the listed Kubernetes Namespace in the Backup. If this field is not provided, no namespace filtering will be performed (all resources in all Namespaces, including all cluster-scoped resources, will be candidates for transformation). To mix cluster-scoped and namespaced resources in the same rule, use an empty string ("") as one of the target namespaces.
RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKind, RestorePlanRestoreConfigTransformationRuleResourceFilterGroupKindArgs
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- Resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- Resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group string - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind string - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource_
group str - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource_
kind str - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
- resource
Group String - API Group string of a Kubernetes resource, e.g. "apiextensions.k8s.io", "storage.k8s.io", etc. Use empty string for core group.
- resource
Kind String - Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc.
RestorePlanRestoreConfigVolumeDataRestorePolicyBinding, RestorePlanRestoreConfigVolumeDataRestorePolicyBindingArgs
- Policy string
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - Volume
Type string - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
- Policy string
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - Volume
Type string - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
- policy String
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Type String - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
- policy string
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Type string - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
- policy str
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume_
type str - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
- policy String
- Specifies the mechanism to be used to restore this volume data.
See https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/reference/rest/v1/RestoreConfig#VolumeDataRestorePolicy
for more information on each policy option.
Possible values are:
RESTORE_VOLUME_DATA_FROM_BACKUP
,REUSE_VOLUME_HANDLE_FROM_BACKUP
,NO_VOLUME_DATA_RESTORATION
. - volume
Type String - The volume type, as determined by the PVC's
bound PV, to apply the policy to.
Possible values are:
GCE_PERSISTENT_DISK
.
Import
RestorePlan can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/restorePlans/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, RestorePlan can be imported using one of the formats above. For example:
$ pulumi import gcp:gkebackup/restorePlan:RestorePlan default projects/{{project}}/locations/{{location}}/restorePlans/{{name}}
$ pulumi import gcp:gkebackup/restorePlan:RestorePlan default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:gkebackup/restorePlan:RestorePlan default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.