Resource: aws_fsx_file_cache

Terraform resource for managing an Amazon File Cache cache. See the Create File Cache for more information.

Example Usage

resource "aws_fsx_file_cache" "example" {

  data_repository_association {
    data_repository_path           = "nfs://filer.domain.com"
    data_repository_subdirectories = ["test", "test2"]
    file_cache_path                = "/ns1"

    nfs {
      dns_ips = ["192.168.0.1", "192.168.0.2"]
      version = "NFS3"
    }
  }

  file_cache_type         = "LUSTRE"
  file_cache_type_version = "2.12"

  lustre_configuration {
    deployment_type = "CACHE_1"
    metadata_configuration {
      storage_capacity = 2400
    }
    per_unit_storage_throughput   = 1000
    weekly_maintenance_start_time = "2:05:00"
  }

  subnet_ids       = [aws_subnet.test1.id]
  storage_capacity = 1200
}

Argument Reference

The following arguments are required:

The following arguments are optional:

Data Repository Association arguments

The data_repository_association configuration block supports the following arguments:

NFS arguments

The nfs configuration block supports the following arguments:

Lustre Configuration arguments

The lustre_configuration configuration block supports the following arguments:

Metadata Configuration arguments

The metadata_configuration configuration block supports the following 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 Amazon File Cache cache using the resource id. For example:

import {
  to = aws_fsx_file_cache.example
  id = "fc-8012925589"
}

Using terraform import, import Amazon File Cache cache using the resource id. For example:

% terraform import aws_fsx_file_cache.example fc-8012925589