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.
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"
}
}
Name | Version |
---|---|
terraform | ~> 1.8.0 |
aws | ~> 5.0 |
Name | Version |
---|---|
aws | ~> 5.0 |
No modules.
Name | Type |
---|---|
aws_efs_backup_policy.this | resource |
aws_efs_file_system.this | resource |
aws_efs_mount_target.this | resource |
aws_security_group.this | resource |
aws_security_group_rule.this_egress | resource |
aws_security_group_rule.this_ingress | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
backup_policy_status | Enable/disable backup for EFS Filesystem. Value should be ENABLE/DISABLED. Defaults to DISABLED | string |
"DISABLED" |
no |
encrypted | If true, the file system will be encrypted | bool |
true |
no |
kms_key_id | If set, use a specific KMS key | string |
null |
no |
lifecycle_policy | Lifecycle Policy for the EFS Filesystem | list(object({ |
[] |
no |
name | 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. | string |
n/a | yes |
performance_mode | The file system performance mode. | string |
null |
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 |
security_group_egress | Can be specified multiple times for each egress rule. | map(object({ |
{ |
no |
security_group_ingress | Can be specified multiple times for each ingress rule. | map(object({ |
{ |
no |
subnet_ids | Subnet IDs for Mount Targets | list(string) |
n/a | yes |
tags | A map of tags to add to all resources | map(string) |
{} |
no |
throughput_mode | Throughput mode for the file system. | string |
null |
no |
vpc_id | The name of the VPC that EFS will be deployed to | string |
n/a | yes |
Name | Description |
---|---|
arn | EFS ARN |
dns_name | EFS DNS name |
id | EFS ID |
mount_target_ids | List of EFS mount target IDs (one per Availability Zone) |
security_group_arn | EFS Security Group ARN |
security_group_id | EFS Security Group ID |
security_group_name | EFS Security Group name |