Skip to content

Resource: aws_efs_file_system#

Creates an Elastic File System (EFS) file system.

Example usage#

EFS File System with tags#

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

  tags = {
    Name = "MyProduct"
  }
}

Argument reference#

The following arguments are supported:

  • creation_token - (Optional) A unique name used as reference when creating the Elastic File System to ensure idempotent file system creation. By default generated by Terraform. See Elastic File System user guide for more information.
    • Value length: From 1 to 64 symbols
  • tags - (Optional) A map of tags to assign to the file system. If a provider default_tags configuration block is used, tags with matching keys will overwrite those defined at the provider level.

Attributes reference#

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

  • id - The ID that identifies the file system.
    • Example: fs-ccfc0d65
  • number_of_mount_targets - The current number of mount targets that the file system has.
  • owner_id - The account that was used to create the file system. If the file system was created by an IAM user, the parent account to which the user belongs is the owner.
  • performance_mode - The file system performance mode.
    • Valid values: "generalPurpose"
  • size_in_bytes - The latest known metered size (in bytes) of data stored in the file system. The value is not the exact size that the file system was at any point in time. The structure of this block is described below.
  • tags_all - A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

size_in_bytes#

  • value - The latest known metered size (in bytes) of data stored in the file system.

Import#

The EFS file systems can be imported using the id, for example:

$ terraform import aws_efs_file_system.foo fs-6fa144c6