Resource: aws_efs_file_system

Provides an Elastic File System (EFS) File System resource.

Example Usage

EFS File System w/ tags

resource "aws_efs_file_system" "foo" {
  creation_token = "my-product"

  tags = {
    Name = "MyProduct"
  }
}

Using lifecycle policy

resource "aws_efs_file_system" "foo_with_lifecyle_policy" {
  creation_token = "my-product"

  lifecycle_policy {
    transition_to_ia = "AFTER_30_DAYS"
  }
}

Argument Reference

This resource supports the following arguments:

lifecycle_policy Block

Describes a policy used by Lifecycle management that specifies when to transition files into and out of storage classes. For more information, see Managing file system storage.

The lifecycle_policy block supports the following arguments:

protection Block

Describes the protection on a file system.

The protection block supports the following arguments:

Attribute Reference

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

Size In Bytes

Import

In Terraform v1.5.0 and later, use an import block to import the EFS file systems using the id. For example:

import {
  to = aws_efs_file_system.foo
  id = "fs-6fa144c6"
}

Using terraform import, import the EFS file systems using the id. For example:

% terraform import aws_efs_file_system.foo fs-6fa144c6