Generic module to create an EFS share in AWS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Julien Cabillot 597533e213
chore: fix pre-commit
1 month ago
examples chore: fix pre-commit 1 month ago
.gitignore tech: adds gitignore 1 year ago
.pre-commit-config.yaml chore: fix pre-commit 1 month ago
AUTHORS fix: Do not depend on default vpc 9 months ago
CHANGELOG.md chore: fix pre-commit 1 month ago
Jenkinsfile Change Jenkinsfile to use latest version of terraform 1 year ago
README.md maint: adding documentation 4 months ago
data.tf fix: Do not depend on default vpc 9 months ago
main.tf maint: revert line carriages 4 months ago
outputs.tf Fix pre-commit 9 months ago
variables.tf feat: adding lifecycle policy 4 months ago
versions.tf fix: Do not depend on default vpc 9 months ago

README.md

Terraform EFS module

This module is not to be deployed directly.

Requirements

Name Version
terraform >= 0.12
aws >= 2.7.0

Providers

Name Version
aws >= 2.7.0

Inputs

Name Description Type Default Required
allowed_cidrs CIDRs allowed to access the EFS. Must be a list of object containing “cidr” and “target” (the target of the CIDR). list [] no
allowed_security_group_ids CIDRs allowed to access the EFS. Must be a list of object containing “cidr” and “target” (the target of the CIDR). list [] no
efs_tags Tags specific for the EFS. Will be merged with tags. map {} no
enabled Whether or not to enable this entire module or not. bool true no
kms_key_alias_name Name of the KMS key alias to be used to encrypt the EFS. string "alias/efs" no
kms_key_arn ARN of the KMS key to be used to encrypt the EFS. Should be specified when kms_key_create is false. string "" no
kms_key_create Wheter or not it is needed to create the KMS key for the EFS. bool true no
kms_key_name Name of the KMS key to be used to encrypt the EFS. string "efs" no
kms_tags Tags specific for the KMS key for the EFS. Will be merged with tags. map {} no
lifecycle_policy Lifecycle policy list(string) [] no
name Name of the EFS. string "efs" no
performance_mode The file system performance mode. Can be either ”generalPurpose” or “maxIO”. string "generalPurpose" no
provisioned_throughput_in_mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with throughput_mode set to “provisioned”. number 0 no
security_group_ids List of additionnal security group IDs to be used by the EFS mount targets. MUST be specified when no allowed_cidrs or allowed_security_group_ids is provided. list [] no
security_group_name Name of the security group to be used by the EFS mount targets. Security group will be create ONLY IF allowed_cidrs or allowed_security_group_ids is NOT an empty list. string "efs" no
security_group_tags Additionnal tags specific for the security group for the EFS mount targets. Will be merged with tags. map {} no
ssm_parameter_enabled Whether or not to create SSM Parameters containing EFS data. bool false no
ssm_parameter_prefix Prefix for the SSM Parameters created by this module. It should an absolute path without trailing slash (e.g /my/example/path). string "/efs/module/default" no
ssm_parameter_tags Tags specific for the SSM Parameters for the EFS. Will be merged with tags. map {} no
subnet_ids IDs of the subnet where the EFS should be made available. If none are specified, it will be deployed in the default vpc WITHOUT mount targets. list(string) [] no
tags Tags to be shared among all resources of this module. map {} no
throughput_mode Throughput mode for the file system. Valid values: ”bursting”, “provisioned”. When using provisioned, also set provisioned_throughput_in_mibps. string "bursting" no

Outputs

Name Description
efs_arn Amazon Resource Name of the file system.
efs_dns_name The DNS name for the filesystem.
efs_id The ID that identifies the file system (e.g. fs-ccfc0d65).
efs_mount_target_ids The IDs of the EFS mount targets.
efs_mount_target_network_interface_ids The IDs of the network interfaces that Amazon EFS created when it created the mount targets.
kms_alias_arn The Amazon Resource Name (ARN) of the EFS key alias. This output will be empty if the KMS key was passed as variable.
kms_key_arn The Amazon Resource Name (ARN) of the EFS key. This output will be empty if the KMS key was passed as variable.
kms_key_id The globally unique identifier for the EFS key. This output will be empty if the KMS key was passed as variable.
security_group_id ID of the security group used for the EFS. This output will be empty if the security groups IDs were passed as variables.
security_group_rule_ids List of ID's of the security rules added to security group
ssm_parameter_arns The ARNs of the SSM Parameters for the EFS.
ssm_parameter_names The names of the SSM Parameters for the EFS.