Skip to content

Resource: awsFsxBackup

Provides a FSx Backup resource.

Example Usage

Lustre Example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxLustreFileSystemExample =
  new aws.fsxLustreFileSystem.FsxLustreFileSystem(this, "example", {
    deploymentType: "PERSISTENT_1",
    perUnitStorageThroughput: 50,
    storageCapacity: 1200,
    subnetIds: ["${aws_subnet.example.id}"],
  });
const awsFsxBackupExample = new aws.fsxBackup.FsxBackup(this, "example_1", {
  fileSystemId: awsFsxLustreFileSystemExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxBackupExample.overrideLogicalId("example");

Windows Example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxWindowsFileSystemExample =
  new aws.fsxWindowsFileSystem.FsxWindowsFileSystem(this, "example", {
    activeDirectoryId: "${aws_directory_service_directory.eample.id}",
    skipFinalBackup: true,
    storageCapacity: 32,
    subnetIds: ["${aws_subnet.example1.id}"],
    throughputCapacity: 8,
  });
const awsFsxBackupExample = new aws.fsxBackup.FsxBackup(this, "example_1", {
  fileSystemId: awsFsxWindowsFileSystemExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxBackupExample.overrideLogicalId("example");

ONTAP Example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxOntapVolumeExample = new aws.fsxOntapVolume.FsxOntapVolume(
  this,
  "example",
  {
    junctionPath: "/example",
    name: "example",
    sizeInMegabytes: 1024,
    storageEfficiencyEnabled: true,
    storageVirtualMachineId: "${aws_fsx_ontap_storage_virtual_machine.test.id}",
  }
);
const awsFsxBackupExample = new aws.fsxBackup.FsxBackup(this, "example_1", {
  volumeId: awsFsxOntapVolumeExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxBackupExample.overrideLogicalId("example");

OpenZFS Example

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxOpenzfsFileSystemExample =
  new aws.fsxOpenzfsFileSystem.FsxOpenzfsFileSystem(this, "example", {
    deploymentType: "SINGLE_AZ_1",
    storageCapacity: 64,
    subnetIds: ["${aws_subnet.example.id}"],
    throughputCapacity: 64,
  });
const awsFsxBackupExample = new aws.fsxBackup.FsxBackup(this, "example_1", {
  fileSystemId: awsFsxOpenzfsFileSystemExample.id,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxBackupExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

Note - Only file_system_id or volume_id can be specified. file_system_id is used for Lustre and Windows, volume_id is used for ONTAP.

  • fileSystemId - (Optional) The ID of the file system to back up. Required if backing up Lustre or Windows file systems.
  • tags - (Optional) A map of tags to assign to the file system. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set copyTagsToBackups to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
  • volumeId - (Optional) The ID of the volume to back up. Required if backing up a ONTAP Volume.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - Amazon Resource Name of the backup.
  • id - Identifier of the backup, e.g., fs12345678
  • kmsKeyId - The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.
  • ownerId - AWS account identifier that created the file system.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • type - The type of the file system backup.

Timeouts

Configuration options:

  • create - (Default 10M)
  • delete - (Default 10M)

Import

FSx Backups can be imported using the id, e.g.,

$ terraform import aws_fsx_backup.example fs-543ab12b1ca672f33