Resource: aws_fsx_data_repository_association

Manages a FSx for Lustre Data Repository Association. See Linking your file system to an S3 bucket for more information.

Example Usage

resource "aws_s3_bucket" "example" {
  bucket = "my-bucket"
}

resource "aws_s3_bucket_acl" "example" {
  bucket = aws_s3_bucket.example.id
  acl    = "private"
}

resource "aws_fsx_lustre_file_system" "example" {
  storage_capacity = 1200
  subnet_ids       = [aws_subnet.example.id]
  deployment_type  = "PERSISTENT_2"

  per_unit_storage_throughput = 125
}

resource "aws_fsx_data_repository_association" "example" {
  file_system_id       = aws_fsx_lustre_file_system.example.id
  data_repository_path = "s3://${aws_s3_bucket.example.id}"
  file_system_path     = "/my-bucket"

  s3 {
    auto_export_policy {
      events = ["NEW", "CHANGED", "DELETED"]
    }

    auto_import_policy {
      events = ["NEW", "CHANGED", "DELETED"]
    }
  }
}

Argument Reference

This resource supports the following arguments:

S3 arguments

Events arguments

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 Data Repository Associations using the id. For example:

import {
  to = aws_fsx_data_repository_association.example
  id = "dra-0b1cfaeca11088b10"
}

Using terraform import, import FSx Data Repository Associations using the id. For example:

% terraform import aws_fsx_data_repository_association.example dra-0b1cfaeca11088b10