Skip to content

terraform-iaac/terraform-aws-efs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform module for AWS EFS Service

Terraform module used to create AWS EFS. With simple syntax.

Usage

NOTE: You should add whitelist_cidr or whitelist_sg option, becuase by default module doesn't create any security group rules, thus EFS has restricted access.

Example of usage:

module "ec2" {
  source = "terraform-iaac/terraform-aws-efs/aws"

  name           = "data-files"
  vpc_id         = module.vpc.vpc_id
  subnet_ids     = module.vpc.private_subnets
  env_name       = var.env_name
  whitelist_cidr = ["10.10.10.2", "10.10.10.200"]
  whitelist_sg   = ["sg-12315315123"]
}

Requirements

Name Version
terraform >= 0.14.0
aws >= 3.0.0

Providers

Name Version
aws >= 3.0.0

Modules

No modules.

Resources

Name Type
aws_efs_access_point.permissions resource
aws_efs_file_system.efs_storage resource
aws_efs_mount_target.efs_storage_mount_target resource
aws_security_group.nfs_sg resource

Inputs

Name Description Type Default Required
create_efs_ap Create custom permissions to root of EFS bool false no
encrypted If true, the disk will be encrypted bool true no
kms_key_id The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true string null no
lifecycle_policy A file system lifecycle policy object with optional transition_to_ia and transition_to_primary_storage_class map(string) {} no
name Name for SG, EFS string n/a yes
owner_gid Specifies the POSIX group ID to apply to the root_directory number 0 no
owner_uid Specifies the POSIX user ID to apply to the root_directory number 0 no
performance_mode_mode The file system performance mode 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 string null no
root_permissions Add permissions to root directory EFS string "0777" no
subnet_ids VPC Subnets for mount points list(string) n/a yes
tags AWS tags map {} no
throughput_mode Throughput mode for the file system string "bursting" no
vpc_id VPC where subnets locates string n/a yes
whitelist_cidr List of CIDR blocks for whitelist list(string) [] no
whitelist_sg List of Security Groups Block for whitelist list(string) [] no

Outputs

Name Description
cidr_whitelist n/a
efs_arn n/a
efs_endpoint n/a
efs_id n/a
sg_id n/a
sg_whitelist n/a