
terraform-aws-arc-fsx¶
Module:
sourcefuse/arc-fsx/awsRegistry: https://registry.terraform.io/modules/sourcefuse/arc-fsx/aws
Category: Storage / File System
Overview¶
Creates Amazon FSx file systems — Windows File Server, Lustre, ONTAP, and OpenZFS — with VPC, security groups, and backup configuration.
What It Does¶
This module provides comprehensive support for multiple Amazon FSx file system types and related storage management capabilities, enabling flexible, secure, and scalable deployments.
For more information about this repository and its usage, please see Terraform AWS FSX Usage Guide.
Supported FSx Types¶
- Windows File Server: Fully managed Windows-native file storage
- Lustre: High-performance file storage for compute-intensive workloads
- NetApp ONTAP: Enterprise-grade shared storage with advanced data management
- OpenZFS: High-performance ZFS-based file storage
- FSx File Cache: High-speed caching layer for frequently accessed datasets
Core Capabilities¶
- Volume Management: Create and manage ONTAP and OpenZFS volumes
- Storage Virtual Machines (SVMs): Configure ONTAP SVMs for storage isolation and administration
- Snapshot Management: Create and manage OpenZFS snapshots for data protection
- Backup Management: Support for manual backups, automated backups, and retention policies
- S3 Integration: Configure Data Repository Associations (DRA) for Lustre file systems
- Active Directory Integration: Support for both AWS Managed Active Directory and self-managed Active Directory
- Security Controls: Integration with SourceFuse ARC Security Group module for protocol-specific access rules
- Encryption at Rest: KMS-based encryption support for enhanced data security
- IAM Integration: Optional IAM role creation with least-privilege policies
- Flexible Networking: Support for both Single-AZ and Multi-AZ deployment options
FSx Component Support Matrix¶
| Capability | Windows | Lustre | ONTAP | OpenZFS | File Cache |
|---|---|---|---|---|---|
| File Systems | Yes | Yes | Yes | Yes | Yes |
| Volumes | No | No | Yes | Yes | No |
| Storage Virtual Machines | No | No | Yes | No | No |
| Snapshots | No | No | No | Yes | No |
| Backups | Yes | Yes | Yes | Yes | No |
| Data Repository | No | Yes | No | No | No |
| Multi-AZ | Yes | No | Yes | Yes | No |
| S3 Integration | No | Yes | No | No | No |
Key Notes¶
- ONTAP supports advanced storage features such as Volumes, Storage Virtual Machines (SVMs), and Multi-AZ deployments.
- OpenZFS supports Snapshots, Volumes, and Multi-AZ configurations for enhanced resilience.
- Lustre integrates with Amazon S3 using Data Repository Associations (DRA) for high-performance data processing workloads.
- File Cache is designed for high-speed caching and does not support persistent storage features such as backups, snapshots, or volumes.
Quickstart¶
Basic Windows File Server¶
NetApp ONTAP Complete¶
OpenZFS Complete¶
Examples¶
- Basic Windows File Server - Single-AZ Windows file server with AWS Managed AD
- Windows with Self-Managed AD - Windows file server with custom Active Directory
- Lustre - High-performance Lustre file system
- ONTAP Complete - NetApp ONTAP with storage virtual machines and volumes
- ONTAP Multi-Protocol - NetApp ONTAP with NFS, SMB, and iSCSI support
- OpenZFS Complete - OpenZFS with snapshots and compression
Security Considerations¶
- Security groups are created with minimal required ports for each FSx type
- KMS encryption is supported for data at rest
- IAM roles follow least-privilege principles
- Network access is restricted to specified CIDR blocks
- Backup encryption is enabled by default
Required Inputs¶
| Name | Type | Description |
|---|---|---|
name |
string |
FSx file system name |
environment |
string |
Deployment environment |
fsx_type |
string |
FSx type: windows, lustre, ontap, or openzfs |
vpc_id |
string |
VPC ID |
subnet_ids |
list(string) |
Subnet IDs |
| ## Key Outputs |
| Name | Description |
|---|---|
file_system_id |
FSx file system ID |
dns_name |
FSx DNS name |
| ## Full Variable & Output Reference |
The complete inputs/outputs reference is auto-generated below.
Requirements¶
| Name | Version |
|---|---|
| terraform | >= 1.3 |
| aws | >= 5.0, < 7.0 |
Providers¶
| Name | Version |
|---|---|
| aws | 6.28.0 |
| random | 3.7.2 |
Modules¶
No modules.
Resources¶
| Name | Type |
|---|---|
| aws_fsx_backup.this | resource |
| aws_fsx_data_repository_association.this | resource |
| aws_fsx_file_cache.this | resource |
| aws_fsx_lustre_file_system.this | resource |
| aws_fsx_ontap_file_system.this | resource |
| aws_fsx_ontap_storage_virtual_machine.this | resource |
| aws_fsx_ontap_volume.this | resource |
| aws_fsx_openzfs_file_system.this | resource |
| aws_fsx_openzfs_snapshot.this | resource |
| aws_fsx_openzfs_volume.this | resource |
| aws_fsx_windows_file_system.this | resource |
| aws_iam_role.this | resource |
| aws_iam_role_policy.custom | resource |
| aws_iam_role_policy_attachment.this | resource |
| aws_ssm_parameter.fsx_admin | resource |
| aws_ssm_parameter.svm_admin | resource |
| random_id.fsx | resource |
| random_password.fsx_admin | resource |
| random_password.svm_admin | resource |
| aws_iam_policy_document.assume_role | data source |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| backup_configuration | Backup configuration for FSx file systems | object({ |
{} |
no |
| create | Whether to create FSx resources | bool |
true |
no |
| deployment_type | Deployment type for the file system | string |
null |
no |
| environment | Environment name (e.g., dev, staging, prod) | string |
"dev" |
no |
| file_cache_configuration | FSx File Cache configuration | object({ |
{} |
no |
| fsx_backups | FSx Backups configuration | map(object({ |
{} |
no |
| fsx_type | Type of FSx file system to create | string |
"windows" |
no |
| iam_configuration | IAM configuration for FSx | object({ |
{} |
no |
| kms_key_id | KMS key ID for encryption | string |
null |
no |
| lustre_configuration | Lustre file system specific configuration | object({ |
{} |
no |
| name | Name prefix for FSx resources | string |
"" |
no |
| ontap_configuration | ONTAP file system specific configuration | object({ |
{} |
no |
| openzfs_configuration | OpenZFS file system specific configuration | object({ |
{} |
no |
| preferred_subnet_id | Preferred subnet ID for multi-AZ deployments | string |
null |
no |
| security_group_ids | List of security group IDs to use for FSx | list(string) |
[] |
no |
| storage_capacity | Storage capacity of the file system in GiB | number |
n/a | yes |
| storage_type | Storage type (SSD or HDD) | string |
"SSD" |
no |
| subnet_ids | List of subnet IDs for the file system | list(string) |
n/a | yes |
| tags | Additional tags to apply to all resources | map(string) |
{} |
no |
| throughput_capacity | Throughput capacity in MB/s | number |
null |
no |
| vpc_id | VPC ID where the file system will be created | string |
n/a | yes |
| weekly_maintenance_start_time | Weekly maintenance start time (d:HH:MM) | string |
null |
no |
| windows_configuration | Windows File Server specific configuration | object({ |
{} |
no |
Outputs¶
| Name | Description |
|---|---|
| data_repository_association_ids | IDs of the data repository associations |
| file_cache_dns_name | DNS name of the FSx File Cache |
| file_cache_id | ID of the FSx File Cache |
| file_cache_network_interface_ids | Network interface IDs of the FSx File Cache |
| fsx_arn | ARN of the FSx file system |
| fsx_backup_arns | ARNs of FSx Backups |
| fsx_backup_ids | IDs of FSx Backups |
| fsx_dns_name | DNS name of the FSx file system |
| fsx_id | ID of the FSx file system |
| fsx_network_interface_ids | Network interface IDs of the FSx file system |
| fsx_owner_id | AWS account ID of the FSx file system owner |
| fsx_type | Type of FSx file system created |
| iam_role_arn | ARN of the created IAM role |
| iam_role_name | Name of the created IAM role |
| lustre_mount_name | Mount name for Lustre file system |
| ontap_endpoints | ONTAP file system endpoints |
| ontap_storage_virtual_machine_endpoints | Endpoints of ONTAP Storage Virtual Machines |
| ontap_storage_virtual_machine_ids | IDs of ONTAP Storage Virtual Machines |
| ontap_volume_arns | ARNs of ONTAP Volumes |
| ontap_volume_ids | IDs of ONTAP Volumes |
| openzfs_root_volume_id | Root volume ID for OpenZFS file system |
| openzfs_snapshot_arns | ARNs of OpenZFS Snapshots |
| openzfs_snapshot_ids | IDs of OpenZFS Snapshots |
| openzfs_volume_arns | ARNs of OpenZFS Volumes |
| openzfs_volume_ids | IDs of OpenZFS Volumes |
| tags | Tags applied to the FSx file system |
| windows_remote_administration_endpoint | Remote administration endpoint for Windows file system |
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
- Configure golang deps for tests
Git commits¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Contributing¶
See CONTRIBUTING.md for commit conventions and development setup.
Authors¶
This project is authored by: - SourceFuse