Backup

A Google Cloud Filestore backup. To get more information about Backup, see:

Example Usage

Filestore Backup Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.filestore.Instance;
import com.pulumi.gcp.filestore.InstanceArgs;
import com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs;
import com.pulumi.gcp.filestore.inputs.InstanceNetworkArgs;
import com.pulumi.gcp.filestore.Backup;
import com.pulumi.gcp.filestore.BackupArgs;
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 instance = new Instance("instance", InstanceArgs.builder()
.location("us-central1-b")
.tier("BASIC_SSD")
.fileShares(InstanceFileSharesArgs.builder()
.capacityGb(2560)
.name("share1")
.build())
.networks(InstanceNetworkArgs.builder()
.network("default")
.modes("MODE_IPV4")
.connectMode("DIRECT_PEERING")
.build())
.build());
var backup = new Backup("backup", BackupArgs.builder()
.location("us-central1")
.sourceInstance(instance.id())
.sourceFileShare("share1")
.description("This is a filestore backup for the test instance")
.labels(Map.ofEntries(
Map.entry("files", "label1"),
Map.entry("other-label", "label2")
))
.build());
}
}

Import

Backup can be imported using any of these accepted formats

$ pulumi import gcp:filestore/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{name}}
$ pulumi import gcp:filestore/backup:Backup default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:filestore/backup:Backup default {{location}}/{{name}}

Properties

Link copied to clipboard
val capacityGb: Output<String>

The amount of bytes needed to allocate a full copy of the snapshot content.

Link copied to clipboard
val createTime: Output<String>

The time when the snapshot was created in RFC3339 text format.

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

A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.

Link copied to clipboard
val downloadBytes: Output<String>

Amount of bytes that will be downloaded if the backup is restored.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val kmsKeyName: Output<String>

KMS key name used for data encryption.

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

Resource labels to represent user-provided metadata.

Link copied to clipboard
val location: Output<String>

The name of the location of the instance. This can be a region for ENTERPRISE tier instances.

Link copied to clipboard
val name: Output<String>

The resource name of the backup. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sourceFileShare: Output<String>

Name of the file share in the source Cloud Filestore instance that the backup is created from.

Link copied to clipboard
val sourceInstance: Output<String>

The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.

Link copied to clipboard

The service tier of the source Cloud Filestore instance that this backup is created from.

Link copied to clipboard
val state: Output<String>

The backup state.

Link copied to clipboard
val storageBytes: Output<String>

The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.

Link copied to clipboard
val urn: Output<String>