EFS Access Point
π¦ Overviewβ
This Terraform module provisions an Amazon EFS Access Point, enabling secure, managed access to a specific directory within an existing EFS file system.
Itβs ideal for applications that require identity-based access to shared file storage without altering the core EFS configuration.
β Key Featuresβ
- Creates a secure Amazon EFS Access Point targeting a specific subdirectory
- Defines POSIX user and group identity for access control
- Supports tagging for environment, naming, and access context
πΌ Use Casesβ
- Multi-user applications requiring identity separation
- Secure EFS access in containerized environments (e.g., ECS, EKS)
- Controlled access to shared EFS volumes in EC2 or Lambda setups
- Mounting subpaths in EFS for workload isolation
π₯ Input Variablesβ
| Name | Type | Description |
|---|---|---|
| region | string | AWS region to deploy the EFS access point |
| file_system_id | string | The ID of the existing EFS file system |
| access_path | string | Path to the directory inside the file system (e.g., /data/app) |
| posix_uid | number | POSIX user ID for access identity |
| posix_gid | number | POSIX group ID for access identity |
| environment | string | Tag to specify the deployment environment (e.g., dev, staging, prod) |
π€ Outputsβ
| Name | Description |
|---|---|
| access_point_id | The ID of the created EFS Access Point |
| access_path | The directory path used in the access point setup |
π Deployment Readinessβ
- β Compatible with Terraform 1.0+
- β Tested with AWS provider 5.x
- π§ͺ Requires an existing EFS file system and access to EFS resources
π οΈ Example Usageβ
module "efs_access_point" {
source = "git::ssh://git@github.com/archiphire/aws-level-1-modules.git//storage/efs-access-point?ref=v1.0.0"
region = "us-east-1"
file_system_id = "fs-12345678"
access_path = "/data/app"
posix_uid = 1001
posix_gid = 1001
environment = "prod"
}
terraform init
terraform plan
terraform apply
or
tofu init
tofu plan
tofu apply
π§Ή Cleanup Optionsβ
To destroy the EFS access point:
terraform destroy
or
tofu destroy
β οΈ This will not delete the EFS file systemβonly the access point itself.
π‘οΈ Notesβ
This is a Level 1 storage module focused on secure, subpath-based EFS access. For full EFS setup including mount targets and performance tuning, combine this with:
efs-filesystem efs-performance-filesystem
π Deployment Package Noticeβ
This module is part of the Level 1 AWS License Tier. To access the full deployment package and source code, subscribe to Archiphire.