GCP.Filestore reference
Backup
Section titled “Backup”Source:
src/GCP/Filestore/Backup.ts
A Cloud Filestore backup of an instance file share.
Changing backupId, location, sourceInstance, sourceFileShare,
or kmsKey replaces the backup. Description and labels update in
place.
Backups are regional. Creating a backup of a Basic HDD share typically takes several minutes.
Backup: Creating a Backup
Section titled “Backup: Creating a Backup”Backup the default share
const nfs = yield* GCP.Filestore.Instance("Nfs", {});const backup = yield* GCP.Filestore.Backup("Nightly", { sourceInstance: nfs.name,});Explicit id, share, labels, and description
const backup = yield* GCP.Filestore.Backup("Nightly", { sourceInstance: nfs.name, sourceFileShare: "share1", backupId: "app-nfs-nightly", location: "us-central1", description: "nightly backup", labels: { env: "prod" },});Backup: Updating a Backup
Section titled “Backup: Updating a Backup”Re-declare the same logical id with changed props; the engine keeps the physical resource and updates it in place.
const backup = yield* GCP.Filestore.Backup("Nightly", { sourceInstance: nfs.name, description: "nightly backup v2", labels: { env: "prod", team: "storage" },});GetBackup
Section titled “GetBackup”Source:
src/GCP/Filestore/GetBackup.ts
Runtime binding for Cloud Filestore backups.get.
Bind this operation to a Backup in a Function/Action init
phase. Provide GetBackupHttp.
GetBackup: Observing Backups
Section titled “GetBackup: Observing Backups”const getBackup = yield* GCP.Filestore.GetBackup(backup);const live = yield* getBackup();GetBackupHttp
Section titled “GetBackupHttp”Source:
src/GCP/Filestore/GetBackupHttp.tsKind: Layer · Provides:GCP.Filestore.GetBackup
HTTP implementation of GetBackup.
GetInstance
Section titled “GetInstance”Source:
src/GCP/Filestore/GetInstance.ts
Runtime binding for Cloud Filestore instances.get.
Bind this operation to an Instance in a Function/Action init
phase. Provide GetInstanceHttp.
GetInstance: Observing Instances
Section titled “GetInstance: Observing Instances”const getInstance = yield* GCP.Filestore.GetInstance(nfs);const live = yield* getInstance();GetInstanceHttp
Section titled “GetInstanceHttp”Source:
src/GCP/Filestore/GetInstanceHttp.tsKind: Layer · Provides:GCP.Filestore.GetInstance
HTTP implementation of GetInstance.
GetInstancesSnapshot
Section titled “GetInstancesSnapshot”Source:
src/GCP/Filestore/GetInstancesSnapshot.ts
Runtime binding for Cloud Filestore snapshots.get.
Bind this operation to an InstancesSnapshot in a
Function/Action init phase. Provide GetInstancesSnapshotHttp.
GetInstancesSnapshot: Observing Snapshots
Section titled “GetInstancesSnapshot: Observing Snapshots”const getSnapshot = yield* GCP.Filestore.GetInstancesSnapshot(snap);const live = yield* getSnapshot();GetInstancesSnapshotHttp
Section titled “GetInstancesSnapshotHttp”Source:
src/GCP/Filestore/GetInstancesSnapshotHttp.tsKind: Layer · Provides:GCP.Filestore.GetInstancesSnapshot
HTTP implementation of GetInstancesSnapshot.
Instance
Section titled “Instance”Source:
src/GCP/Filestore/Instance.ts
A Cloud Filestore instance (NFS file share).
Changing instanceId, location, tier, protocol, kmsKeyName,
share name/sourceBackup, or network identity (network, modes,
connect mode, reserved range) replaces the instance. Description,
labels, share capacity, NFS export options, performance, and deletion
protection update in place.
Provisioning a Basic HDD 1 TiB instance typically takes 5-10 minutes.
Instance: Creating an Instance
Section titled “Instance: Creating an Instance”Generated name, Basic HDD 1 TiB
const nfs = yield* GCP.Filestore.Instance("Nfs", {});Explicit id, labels, and description
const nfs = yield* GCP.Filestore.Instance("Nfs", { instanceId: "app-nfs", location: "us-central1-a", tier: "BASIC_HDD", fileShares: [{ name: "share1", capacityGb: 1024 }], networks: [{ network: "default", modes: ["MODE_IPV4"] }], description: "app file share", labels: { env: "prod" },});Instance: NFS export options
Section titled “Instance: NFS export options”const nfs = yield* GCP.Filestore.Instance("Nfs", { fileShares: [{ name: "share1", capacityGb: 1024, nfsExportOptions: [{ accessMode: "READ_WRITE", squashMode: "ROOT_SQUASH", ipRanges: ["10.0.0.0/8"], }], }],});InstancesSnapshot
Section titled “InstancesSnapshot”Source:
src/GCP/Filestore/InstancesSnapshot.ts
A Cloud Filestore snapshot of an instance.
Changing snapshotId, instance, or location replaces the
snapshot. Description and labels update in place.
Snapshots are supported on Zonal, Regional, Enterprise, and High Scale SSD instances. Basic HDD and Basic SSD reject snapshot create.
InstancesSnapshot: Creating a Snapshot
Section titled “InstancesSnapshot: Creating a Snapshot”Generated name
const snap = yield* GCP.Filestore.InstancesSnapshot("Nightly", { instance: nfs.name,});Explicit id, description, and labels
const snap = yield* GCP.Filestore.InstancesSnapshot("Nightly", { instance: nfs.name, snapshotId: "app-nightly", description: "nightly snapshot", labels: { env: "prod" },});InstancesSnapshot: Updating a Snapshot
Section titled “InstancesSnapshot: Updating a Snapshot”Re-declare the same logical id with changed props; the engine keeps the physical resource and updates it in place.
const snap = yield* GCP.Filestore.InstancesSnapshot("Nightly", { instance: nfs.name, description: "nightly snapshot v2", labels: { env: "prod", team: "storage" },});