Terraform module that creates an Elastic File System on AWS along with the mount targets. It also creates a security group that allows access to 2049 to any instance that has the security group attached to it.
Usage
module"efs-0" {
source ="AustinCloudGuru/efs/aws"# You should pin the module to a specific version# version = "x.x.x"
vpc_id ="vpc-0156c7c6959ba5858"
name ="dev-efs"
subnet_ids = ["subnet-05b1a3ffd786709d5", "subnet-0a35212c972a2af05", "subnet-0d0e78f696428aa28"]
security_group_ingress = {
default = {
description ="NFS Inbound"
from_port =2049
protocol ="tcp"
to_port =2049
self =true
cidr_blocks = []
},
ssh = {
description ="ssh"
from_port =22
protocol ="tcp"
to_port =22
self =true
cidr_blocks = []
}
}
lifecycle_policy = [{
"transition_to_ia"="AFTER_30_DAYS"
}]
tags = {
Terraform ="true"
Environment ="development"
}
}
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.