Skip to content

Resource: awsFsxOpenzfsSnapshot

Manages an Amazon FSx for OpenZFS volume. See the FSx OpenZFS User Guide for more information.

Example Usage

Root volume 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 awsFsxOpenzfsSnapshotExample =
  new aws.fsxOpenzfsSnapshot.FsxOpenzfsSnapshot(this, "example_1", {
    name: "example",
    volumeId: awsFsxOpenzfsFileSystemExample.rootVolumeId,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxOpenzfsSnapshotExample.overrideLogicalId("example");

Child volume 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 awsFsxOpenzfsVolumeExample = new aws.fsxOpenzfsVolume.FsxOpenzfsVolume(
  this,
  "example_1",
  {
    name: "example",
    parentVolumeId: awsFsxOpenzfsFileSystemExample.rootVolumeId,
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsFsxOpenzfsVolumeExample.overrideLogicalId("example");
const awsFsxOpenzfsSnapshotExample =
  new aws.fsxOpenzfsSnapshot.FsxOpenzfsSnapshot(this, "example_2", {
    name: "example",
    volumeId: awsFsxOpenzfsVolumeExample.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.*/
awsFsxOpenzfsSnapshotExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Snapshot. You can use a maximum of 203 alphanumeric characters plus either _ or - or : or . for the name.
  • 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 snapshot. This can be the root volume or a child volume.

Attributes Reference

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

  • arn - Amazon Resource Name of the snapshot.
  • id - Identifier of the snapshot, e.g., fsvolsnap12345678
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Timeouts

Configuration options:

  • create - (Default 30M)
  • delete - (Default 30M)
  • update - (Default 30M)

Import

FSx OpenZFS snapshot can be imported using the id, e.g.,

$ terraform import aws_fsx_openzfs_snapshot.example fs-543ab12b1ca672f33