BackupVaultArgs

data class BackupVaultArgs(val accessRestriction: Output<String>? = null, val allowMissing: Output<Boolean>? = null, val annotations: Output<Map<String, String>>? = null, val backupMinimumEnforcedRetentionDuration: Output<String>? = null, val backupVaultId: Output<String>? = null, val description: Output<String>? = null, val effectiveTime: Output<String>? = null, val forceDelete: Output<Boolean>? = null, val forceUpdate: Output<Boolean>? = null, val ignoreBackupPlanReferences: Output<Boolean>? = null, val ignoreInactiveDatasources: Output<Boolean>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<BackupVaultArgs>

Container to store and organize immutable and indelible backups.

Example Usage

Backup Dr Backup Vault Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const backup_vault_test = new gcp.backupdisasterrecovery.BackupVault("backup-vault-test", {
location: "us-central1",
backupVaultId: "backup-vault-test",
description: "This is a second backup vault built by Terraform.",
backupMinimumEnforcedRetentionDuration: "100000s",
annotations: {
annotations1: "bar1",
annotations2: "baz1",
},
labels: {
foo: "bar1",
bar: "baz1",
},
forceUpdate: true,
accessRestriction: "WITHIN_ORGANIZATION",
ignoreInactiveDatasources: true,
ignoreBackupPlanReferences: true,
allowMissing: true,
});
import pulumi
import pulumi_gcp as gcp
backup_vault_test = gcp.backupdisasterrecovery.BackupVault("backup-vault-test",
location="us-central1",
backup_vault_id="backup-vault-test",
description="This is a second backup vault built by Terraform.",
backup_minimum_enforced_retention_duration="100000s",
annotations={
"annotations1": "bar1",
"annotations2": "baz1",
},
labels={
"foo": "bar1",
"bar": "baz1",
},
force_update=True,
access_restriction="WITHIN_ORGANIZATION",
ignore_inactive_datasources=True,
ignore_backup_plan_references=True,
allow_missing=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var backup_vault_test = new Gcp.BackupDisasterRecovery.BackupVault("backup-vault-test", new()
{
Location = "us-central1",
BackupVaultId = "backup-vault-test",
Description = "This is a second backup vault built by Terraform.",
BackupMinimumEnforcedRetentionDuration = "100000s",
Annotations =
{
{ "annotations1", "bar1" },
{ "annotations2", "baz1" },
},
Labels =
{
{ "foo", "bar1" },
{ "bar", "baz1" },
},
ForceUpdate = true,
AccessRestriction = "WITHIN_ORGANIZATION",
IgnoreInactiveDatasources = true,
IgnoreBackupPlanReferences = true,
AllowMissing = true,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := backupdisasterrecovery.NewBackupVault(ctx, "backup-vault-test", &backupdisasterrecovery.BackupVaultArgs{
Location: pulumi.String("us-central1"),
BackupVaultId: pulumi.String("backup-vault-test"),
Description: pulumi.String("This is a second backup vault built by Terraform."),
BackupMinimumEnforcedRetentionDuration: pulumi.String("100000s"),
Annotations: pulumi.StringMap{
"annotations1": pulumi.String("bar1"),
"annotations2": pulumi.String("baz1"),
},
Labels: pulumi.StringMap{
"foo": pulumi.String("bar1"),
"bar": pulumi.String("baz1"),
},
ForceUpdate: pulumi.Bool(true),
AccessRestriction: pulumi.String("WITHIN_ORGANIZATION"),
IgnoreInactiveDatasources: pulumi.Bool(true),
IgnoreBackupPlanReferences: pulumi.Bool(true),
AllowMissing: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.backupdisasterrecovery.BackupVault;
import com.pulumi.gcp.backupdisasterrecovery.BackupVaultArgs;
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 backup_vault_test = new BackupVault("backup-vault-test", BackupVaultArgs.builder()
.location("us-central1")
.backupVaultId("backup-vault-test")
.description("This is a second backup vault built by Terraform.")
.backupMinimumEnforcedRetentionDuration("100000s")
.annotations(Map.ofEntries(
Map.entry("annotations1", "bar1"),
Map.entry("annotations2", "baz1")
))
.labels(Map.ofEntries(
Map.entry("foo", "bar1"),
Map.entry("bar", "baz1")
))
.forceUpdate(true)
.accessRestriction("WITHIN_ORGANIZATION")
.ignoreInactiveDatasources(true)
.ignoreBackupPlanReferences(true)
.allowMissing(true)
.build());
}
}
resources:
backup-vault-test:
type: gcp:backupdisasterrecovery:BackupVault
properties:
location: us-central1
backupVaultId: backup-vault-test
description: This is a second backup vault built by Terraform.
backupMinimumEnforcedRetentionDuration: 100000s
annotations:
annotations1: bar1
annotations2: baz1
labels:
foo: bar1
bar: baz1
forceUpdate: 'true'
accessRestriction: WITHIN_ORGANIZATION
ignoreInactiveDatasources: 'true'
ignoreBackupPlanReferences: 'true'
allowMissing: 'true'

Import

BackupVault can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/backupVaults/{{backup_vault_id}}

  • {{project}}/{{location}}/{{backup_vault_id}}

  • {{location}}/{{backup_vault_id}} When using the pulumi import command, BackupVault can be imported using one of the formats above. For example:

$ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default projects/{{project}}/locations/{{location}}/backupVaults/{{backup_vault_id}}
$ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default {{project}}/{{location}}/{{backup_vault_id}}
$ pulumi import gcp:backupdisasterrecovery/backupVault:BackupVault default {{location}}/{{backup_vault_id}}

Constructors

Link copied to clipboard
constructor(accessRestriction: Output<String>? = null, allowMissing: Output<Boolean>? = null, annotations: Output<Map<String, String>>? = null, backupMinimumEnforcedRetentionDuration: Output<String>? = null, backupVaultId: Output<String>? = null, description: Output<String>? = null, effectiveTime: Output<String>? = null, forceDelete: Output<Boolean>? = null, forceUpdate: Output<Boolean>? = null, ignoreBackupPlanReferences: Output<Boolean>? = null, ignoreInactiveDatasources: Output<Boolean>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val accessRestriction: Output<String>? = null

Access restriction for the backup vault. Default value is WITHIN_ORGANIZATION if not provided during creation. Default value is WITHIN_ORGANIZATION. Possible values are: ACCESS_RESTRICTION_UNSPECIFIED, WITHIN_PROJECT, WITHIN_ORGANIZATION, UNRESTRICTED, WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA.

Link copied to clipboard
val allowMissing: Output<Boolean>? = null

Allow idempotent deletion of backup vault. The request will still succeed in case the backup vault does not exist.

Link copied to clipboard
val annotations: Output<Map<String, String>>? = null

Optional. User annotations. See https://google.aip.dev/128#annotations Stores small amounts of arbitrary data. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field effective_annotations for all of the annotations present on the resource.

Link copied to clipboard

Required. The default and minimum enforced retention for each backup within the backup vault. The enforced retention for each backup can be extended.

Link copied to clipboard
val backupVaultId: Output<String>? = null

Required. ID of the requesting object.

Link copied to clipboard
val description: Output<String>? = null

Optional. The description of the BackupVault instance (2048 characters or less).

Link copied to clipboard
val effectiveTime: Output<String>? = null

Optional. Time after which the BackupVault resource is locked.

Link copied to clipboard
val forceDelete: Output<Boolean>? = null

(Optional, Deprecated) If set, the following restrictions against deletion of the backup vault instance can be overridden:

Link copied to clipboard
val forceUpdate: Output<Boolean>? = null

If set, allow update to extend the minimum enforced retention for backup vault. This overrides the restriction against conflicting retention periods. This conflict may occur when the expiration schedule defined by the associated backup plan is shorter than the minimum retention set by the backup vault.

Link copied to clipboard
val ignoreBackupPlanReferences: Output<Boolean>? = null

If set, the following restrictions against deletion of the backup vault instance can be overridden:

Link copied to clipboard
val ignoreInactiveDatasources: Output<Boolean>? = null

If set, the following restrictions against deletion of the backup vault instance can be overridden:

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

Optional. Resource labels to represent user provided metadata. 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.

Link copied to clipboard
val location: Output<String>? = null

The GCP location for the backup vault.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Functions

Link copied to clipboard
open override fun toJava(): BackupVaultArgs