Module library

EFS

Terraform module to create AWS EFS resources

Version

Inputs

33
access_pointsoptionalmap(object({ name = optional(string) tags = optional(map(string), {}) posix_user…

A map of access point definitions to create

Default{}
attach_policyoptionalbool

Determines whether a policy is attached to the file system

Defaulttrue
availability_zone_nameoptionalstring

The AWS Availability Zone in which to create the file system. Used to create a file system that uses One Zone storage classes

Defaultnull
bypass_policy_lockout_safety_checkoptionalbool

A flag to indicate whether to bypass the `aws_efs_file_system_policy` lockout safety check. Defaults to `false`

Defaultnull
createoptionalbool

Determines whether resources will be created (affects all resources)

Defaulttrue
create_backup_policyoptionalbool

Determines whether a backup policy is created

Defaulttrue
create_replication_configurationoptionalbool

Determines whether a replication configuration is created

Defaultfalse
create_security_groupoptionalbool

Determines whether a security group is created

Defaulttrue
creation_tokenoptionalstring

A unique name (a maximum of 64 characters are allowed) used as reference when creating the Elastic File System to ensure idempotent file system creation. By default generated by Terraform

Defaultnull
deny_nonsecure_transportoptionalbool

Determines whether `aws:SecureTransport` is required when connecting to elastic file system

Defaulttrue
deny_nonsecure_transport_via_mount_targetoptionalbool

Determines whether to use the common policy option for denying nonsecure transport which allows all AWS principals when accessed via EFS mounted target

Defaulttrue
enable_backup_policyoptionalbool

Determines whether a backup policy is `ENABLED` or `DISABLED`

Defaulttrue
encryptedoptionalbool

If `true`, the disk will be encrypted

Defaulttrue
kms_key_arnoptionalstring

The ARN for the KMS encryption key. When specifying `kms_key_arn`, encrypted needs to be set to `true`

Defaultnull
lifecycle_policyoptionalobject({ transition_to_ia = optional(string) transition_to_archive = optional(st…

A file system [lifecycle policy](https://docs.aws.amazon.com/efs/latest/ug/API_LifecyclePolicy.html) object

Default{}
mount_targetsoptionalmap(object({ ip_address = optional(string) ip_address_type = optional(string) ip…

A map of mount target definitions to create

Default{}
nameoptionalstring

The name of the file system

Default""
override_policy_documentsoptionallist(string)

List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`

Default[]
performance_modeoptionalstring

The file system performance mode. Can be either `generalPurpose` or `maxIO`. Default is `generalPurpose`

Defaultnull
policy_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…

A list of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage

Defaultnull
protectionoptionalobject({ replication_overwrite = optional(string) })

A map of file protection configurations

Defaultnull
provisioned_throughput_in_mibpsoptionalnumber

The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with `throughput_mode` set to `provisioned`

Defaultnull
regionoptionalstring

Region where this resource will be managed. Defaults to the Region set in the provider configuration

Defaultnull
replication_configuration_destinationoptionalobject({ availability_zone_name = optional(string) file_system_id = optional(str…

A destination configuration block

Defaultnull
security_group_descriptionoptionalstring

Security group description. Defaults to Managed by Terraform

Defaultnull
security_group_egress_rulesoptionalmap(object({ name = optional(string) cidr_ipv4 = optional(string) cidr_ipv6 = op…

Map of security group egress rules to add to the security group created

Default{}
security_group_ingress_rulesoptionalmap(object({ name = optional(string) cidr_ipv4 = optional(string) cidr_ipv6 = op…

Map of security group ingress rules to add to the security group created

Default{}
security_group_nameoptionalstring

Name to assign to the security group. If omitted, Terraform will assign a random, unique name

Defaultnull
security_group_use_name_prefixoptionalbool

Determines whether to use a name prefix for the security group. If `true`, the `security_group_name` value will be used as a prefix

Defaultfalse
security_group_vpc_idoptionalstring

The VPC ID where the security group will be created

Defaultnull
source_policy_documentsoptionallist(string)

List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s

Default[]
tagsoptionalmap(string)

A map of tags to add to all resources

Default{}
throughput_modeoptionalstring

Throughput mode for the file system. Defaults to `bursting`. Valid values: `bursting`, `elastic`, and `provisioned`. When using `provisioned`, also set `provisioned_throughput_in_mibps`

Defaultnull

All 33 are optional — the module deploys with none of them set.

Outputs

9
access_points

Map of access points created and their attributes

arn

Amazon Resource Name of the file system

dns_name

The DNS name for the filesystem per [documented convention](http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html)

id

The ID that identifies the file system (e.g., `fs-ccfc0d65`)

mount_targets

Map of mount targets created and their attributes

replication_configuration_destination_file_system_id

The file system ID of the replica

security_group_arn

ARN of the security group

security_group_id

ID of the security group

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

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.