https://github.com/wearetechnative/terraform-aws-module-fsx_lustre
Module for lustre filesystem on AWS
https://github.com/wearetechnative/terraform-aws-module-fsx_lustre
Last synced: 5 months ago
JSON representation
Module for lustre filesystem on AWS
- Host: GitHub
- URL: https://github.com/wearetechnative/terraform-aws-module-fsx_lustre
- Owner: wearetechnative
- License: apache-2.0
- Created: 2024-10-08T14:58:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-14T12:04:42.000Z (over 1 year ago)
- Last Synced: 2025-01-31T12:12:34.770Z (over 1 year ago)
- Language: HCL
- Size: 173 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform AWS [terraform-aws-module-fsx_lustre] 
This module implements ...
[](https://www.technative.nl)
## How does it work
### First use after you clone this repository or when .pre-commit-config.yaml is updated
Run `pre-commit install` to install any guardrails implemented using pre-commit.
See [pre-commit installation](https://pre-commit.com/#install) on how to install pre-commit.
...
## Usage
1. Configure the AWS provider in your root module (not shown below).
2. Add a module block that points to this repository and supply the required variables for capacity, throughput, networking and logging.
3. (Optional) Enable the data repository association (DRA) if you need to sync data to an S3 bucket.
### Minimal example
```hcl
module "fsx_lustre" {
source = "git::https://github.com/wearetechnative/terraform-aws-fsx_lustre.git?ref=main"
fsx_id = "hpc-fsx"
storage_capacity = 1200 # In MB
data_compression_type = "LZ4"
deployment_type = "PERSISTENT_2"
unit_storage_throughput = 125 # MB/s per TiB
subnet_ids = ["subnet-0123456789abcdef0"]
weekly_maintenance_start_time = "6:01:30"
log_level = "WARN_ERROR"
log_retention_days = 7
}
```
### Enabling the optional data repository association
```hcl
module "fsx_lustre" {
source = "git::https://github.com/wearetechnative/terraform-aws-fsx_lustre.git?ref=main"
# ...same required arguments as above...
create_dra = true
dra_bucket_name = "my-lustre-data-repository"
dra_bucket_force_destroy = true
dra_auto_import_events = ["NEW", "CHANGED"]
dra_auto_export_events = ["NEW", "CHANGED", "DELETED"]
}
```
The module exports identifiers and connection details for the created FSx for Lustre file system and, when enabled, the associated S3 data repository. Those outputs can be referenced in other parts of your configuration (see [Outputs](#outputs) below).
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.lustre](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_fsx_data_repository_association.lustre_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/fsx_data_repository_association) | resource |
| [aws_fsx_lustre_file_system.hpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/fsx_lustre_file_system) | resource |
| [aws_s3_bucket.lustre_repository](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_public_access_block.lustre_repository](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
| [aws_s3_bucket_server_side_encryption_configuration.lustre_repository](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |
| [aws_security_group.fsx_sg](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_subnet.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnet) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [backup\_retention\_days](#input\_backup\_retention\_days) | Amount of days automatic backup retention | `number` | `0` | no |
| [create\_dra](#input\_create\_dra) | Whether to create an FSx data repository association backed by an S3 bucket. | `bool` | `false` | no |
| [data\_compression\_type](#input\_data\_compression\_type) | can be LZ4 or NONE | `string` | n/a | yes |
| [deployment\_type](#input\_deployment\_type) | deployment type can be: SCRATCH\_1, SCRATCH\_2, PERSISTENT\_1, PERSISTENT\_2. | `string` | n/a | yes |
| [dra\_auto_export_events](#input\_dra_auto_export_events) | FSx auto export event types to propagate from Lustre to S3. | `list(string)` | `["NEW","CHANGED","DELETED"]` | no |
| [dra\_auto_import_events](#input\_dra_auto_import_events) | FSx auto import event types to propagate from S3 to Lustre. | `list(string)` | `["NEW","CHANGED","DELETED"]` | no |
| [dra\_bucket_force_destroy](#input\_dra_bucket_force_destroy) | Whether to force destroy the data repository bucket when deleting the stack. | `bool` | `false` | no |
| [dra\_bucket_name](#input\_dra_bucket_name) | Name of the S3 bucket to create for the data repository association. Required when create\_dra is true. | `string` | `null` | no |
| [dra\_imported_file_chunk_size](#input\_dra_imported_file_chunk_size) | Size of chunks (in MiB) for files imported from the data repository. | `number` | `1024` | no |
| [fsx\_id](#input\_fsx\_id) | fsx name/id | `string` | `""` | no |
| [log\_level](#input\_log\_level) | Sets which data repository events are logged by Amazon FSx. Valid values are WARN\_ONLY, FAILURE\_ONLY, ERROR\_ONLY, WARN\_ERROR and DISABLED | `string` | n/a | yes |
| [log\_retention\_days](#input\_log\_retention\_days) | n/a | `string` | `"7"` | no |
| [storage\_capacity](#input\_storage\_capacity) | storage capacity of Lustre fs (amount of MB's) | `number` | n/a | yes |
| [subnet\_ids](#input\_subnet\_ids) | A list of IDs for the security groups that apply to the specified network interfaces created for file system access. | `list(string)` | n/a | yes |
| [unit\_storage\_throughput](#input\_unit\_storage\_throughput) | Describes the amount of read and write throughput for each 1 tebibyte of storage, in MB/s/TiB, required for the PERSISTENT\_1 and PERSISTENT\_2 deployment\_type | `string` | n/a | yes |
| [weekly\_maintenance\_start\_time](#input\_weekly\_maintenance\_start\_time) | The preferred start time (in d:HH:MM format) to perform weekly maintenance, in the UTC time zone. | `string` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| [lustre\_arn](#output\_lustre\_arn) | ARN of the FSx-Lustre |
| [lustre\_dns\_name](#output\_lustre\_dns\_name) | DNS name of the FSx-Lustre |
| [data\_repository\_bucket\_name](#output\_data_repository_bucket_name) | Name of the S3 bucket created for the data repository association (if enabled). |
| [data\_repository\_association\_id](#output\_data_repository_association_id) | ID of the data repository association (if enabled). |
| [lustre\_securitygroup\_id](#output\_lustre\_securitygroup\_id) | ID of the security\_group created for the FSx-Lustre |