Resource: aws_fsx_backup

Provides a FSx Backup resource.

Example Usage

Lustre Example

resource "aws_fsx_backup" "example" {
  file_system_id = aws_fsx_lustre_file_system.example.id
}

resource "aws_fsx_lustre_file_system" "example" {
  storage_capacity            = 1200
  subnet_ids                  = [aws_subnet.example.id]
  deployment_type             = "PERSISTENT_1"
  per_unit_storage_throughput = 50
}

Windows Example

resource "aws_fsx_backup" "example" {
  file_system_id = aws_fsx_windows_file_system.example.id
}

resource "aws_fsx_windows_file_system" "example" {
  active_directory_id = aws_directory_service_directory.eample.id
  skip_final_backup   = true
  storage_capacity    = 32
  subnet_ids          = [aws_subnet.example1.id]
  throughput_capacity = 8
}

ONTAP Example

resource "aws_fsx_backup" "example" {
  volume_id = aws_fsx_ontap_volume.example.id
}

resource "aws_fsx_ontap_volume" "example" {
  name                       = "example"
  junction_path              = "/example"
  size_in_megabytes          = 1024
  storage_efficiency_enabled = true
  storage_virtual_machine_id = aws_fsx_ontap_storage_virtual_machine.test.id
}

OpenZFS Example

resource "aws_fsx_backup" "example" {
  file_system_id = aws_fsx_openzfs_file_system.example.id
}

resource "aws_fsx_openzfs_file_system" "example" {
  storage_capacity    = 64
  subnet_ids          = [aws_subnet.example.id]
  deployment_type     = "SINGLE_AZ_1"
  throughput_capacity = 64
}

Argument Reference

This resource supports the following arguments:

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.

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import FSx Backups using the id. For example:

import {
  to = aws_fsx_backup.example
  id = "fs-543ab12b1ca672f33"
}

Using terraform import, import FSx Backups using the id. For example:

% terraform import aws_fsx_backup.example fs-543ab12b1ca672f33