
terraform-aws-arc-fsx¶
Introduction¶
SourceFuse's AWS Reference Architecture (ARC) Terraform module facilitates the management of a comprehensive, reusable Terraform module for provisioning and managing AWS IAM Identity Center (AWS SSO) resources following AWS and Terraform best practices.
Features¶
- Multi-FSx Support: Windows File Server, Lustre, NetApp ONTAP, and OpenZFS
- File Cache: FSx File Cache for high-performance caching
- Volumes: ONTAP and OpenZFS volume management
- Storage Virtual Machines: ONTAP SVM creation and configuration
- Snapshots: OpenZFS snapshot management
- Backups: Manual backup creation and management
- Security: SourceFuse ARC Security Group module with protocol-specific rules
- Active Directory: Support for both AWS Managed AD and self-managed AD
- S3 Integration: Data repository associations for Lustre file systems
- Backup Management: Configurable automatic backups and retention
- Encryption: KMS encryption support for data at rest
- IAM Integration: Optional IAM role creation with least-privilege policies
- Flexible Networking: Multi-AZ and single-AZ deployment options
FSx Component Support Matrix¶
| Component | 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 |
Usage¶
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
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
Authors¶
This project is authored by: - SourceFuse