Skip to content

Commit

Permalink
efa_enabled support
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenbaum committed Dec 22, 2024
1 parent a1c9248 commit 1a5e0e6
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 28 deletions.
4 changes: 2 additions & 2 deletions examples/lustre/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/lustre/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
4 changes: 2 additions & 2 deletions examples/ontap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/ontap/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
4 changes: 2 additions & 2 deletions examples/openzfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/openzfs/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
4 changes: 2 additions & 2 deletions examples/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/windows/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
6 changes: 4 additions & 2 deletions modules/lustre/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down Expand Up @@ -209,6 +209,7 @@ No modules.
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html) | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name) | Name of the CloudWatch Log Group to send logs to. Note: `/aws/fsx/` is pre-pended to the name provided as this is a requirement by FSx | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_retention_in_days"></a> [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | Number of days to retain log events. Default retention - 90 days | `number` | `90` | no |
| <a name="input_cloudwatch_log_group_skip_destroy"></a> [cloudwatch\_log\_group\_skip\_destroy](#input\_cloudwatch\_log\_group\_skip\_destroy) | Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state | `bool` | `null` | no |
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | A map of additional tags to add to the cloudwatch log group created | `map(string)` | `{}` | no |
| <a name="input_cloudwatch_log_group_use_name_prefix"></a> [cloudwatch\_log\_group\_use\_name\_prefix](#input\_cloudwatch\_log\_group\_use\_name\_prefix) | Determines whether the log group name should be prefixed with the `cloudwatch_log_group_name` provided | `bool` | `true` | no |
| <a name="input_copy_tags_to_backups"></a> [copy\_tags\_to\_backups](#input\_copy\_tags\_to\_backups) | A boolean flag indicating whether tags for the file system should be copied to backups | `bool` | `false` | no |
Expand All @@ -223,6 +224,7 @@ No modules.
| <a name="input_data_repository_associations_timeouts"></a> [data\_repository\_associations\_timeouts](#input\_data\_repository\_associations\_timeouts) | Create, update, and delete timeout configurations for the data repository associations | `map(string)` | `{}` | no |
| <a name="input_deployment_type"></a> [deployment\_type](#input\_deployment\_type) | The filesystem deployment type. One of: `SCRATCH_1`, `SCRATCH_2`, `PERSISTENT_1`, `PERSISTENT_2` | `string` | `null` | no |
| <a name="input_drive_cache_type"></a> [drive\_cache\_type](#input\_drive\_cache\_type) | The type of drive cache used by `PERSISTENT_1` filesystems that are provisioned with `HDD` `storage_type` | `string` | `null` | no |
| <a name="input_efa_enabled"></a> [efa\_enabled](#input\_efa\_enabled) | Adds support for Elastic Fabric Adapter (EFA) and GPUDirect Storage (GDS) to Lustre. This must be set at creation. If set this cannot be changed and this prevents changes to per\_unit\_storage\_throughput. This is only supported when deployment\_type is set to PERSISTENT\_2, metadata\_configuration is used, and an EFA-enabled security group is attached | `bool` | `null` | no |
| <a name="input_file_cache_copy_tags_to_data_repository_associations"></a> [file\_cache\_copy\_tags\_to\_data\_repository\_associations](#input\_file\_cache\_copy\_tags\_to\_data\_repository\_associations) | A boolean flag indicating whether tags for the cache should be copied to data repository associations. This value defaults to `false` | `bool` | `null` | no |
| <a name="input_file_cache_kms_key_id"></a> [file\_cache\_kms\_key\_id](#input\_file\_cache\_kms\_key\_id) | Specifies the ID of the AWS Key Management Service (AWS KMS) key to use for encrypting data on an Amazon File Cache | `string` | `null` | no |
| <a name="input_file_cache_lustre_configuration"></a> [file\_cache\_lustre\_configuration](#input\_file\_cache\_lustre\_configuration) | The configuration object for Amazon FSx for Lustre | `any` | `{}` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/lustre/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ resource "aws_fsx_lustre_file_system" "this" {
data_compression_type = var.data_compression_type
deployment_type = var.deployment_type
drive_cache_type = local.is_persistent_1 ? var.drive_cache_type : null
efa_enabled = var.efa_enabled
# export_path - see data_repository_associations
file_system_type_version = var.file_system_type_version
# import_path - see data_repository_associations
Expand Down Expand Up @@ -87,6 +88,7 @@ resource "aws_cloudwatch_log_group" "this" {
retention_in_days = var.cloudwatch_log_group_retention_in_days
kms_key_id = var.cloudwatch_log_group_kms_key_id
log_group_class = var.cloudwatch_log_group_class
skip_destroy = var.cloudwatch_log_group_skip_destroy

tags = merge(
var.tags,
Expand Down
12 changes: 12 additions & 0 deletions modules/lustre/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ variable "drive_cache_type" {
default = null
}

variable "efa_enabled" {
description = "Adds support for Elastic Fabric Adapter (EFA) and GPUDirect Storage (GDS) to Lustre. This must be set at creation. If set this cannot be changed and this prevents changes to per_unit_storage_throughput. This is only supported when deployment_type is set to PERSISTENT_2, metadata_configuration is used, and an EFA-enabled security group is attached"
type = bool
default = null
}

variable "file_system_type_version" {
description = "Sets the Lustre version for the file system that you're creating"
type = string
Expand Down Expand Up @@ -175,6 +181,12 @@ variable "cloudwatch_log_group_class" {
default = null
}

variable "cloudwatch_log_group_skip_destroy" {
description = "Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state"
type = bool
default = null
}

variable "cloudwatch_log_group_tags" {
description = "A map of additional tags to add to the cloudwatch log group created"
type = map(string)
Expand Down
2 changes: 1 addition & 1 deletion modules/lustre/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
4 changes: 2 additions & 2 deletions modules/ontap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/ontap/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
4 changes: 2 additions & 2 deletions modules/openzfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/openzfs/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
5 changes: 3 additions & 2 deletions modules/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.53 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.82 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.53 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.82 |

## Modules

Expand Down Expand Up @@ -109,6 +109,7 @@ No modules.
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If a KMS Key ARN is set, this key will be used to encrypt the corresponding log group. Please be sure that the KMS Key has an appropriate key policy (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html) | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name) | Name of the CloudWatch Log Group to send logs to. Note: `/aws/fsx/` is pre-pended to the name provided as this is a requirement by FSx | `string` | `null` | no |
| <a name="input_cloudwatch_log_group_retention_in_days"></a> [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days) | Number of days to retain log events. Default retention - 90 days | `number` | `90` | no |
| <a name="input_cloudwatch_log_group_skip_destroy"></a> [cloudwatch\_log\_group\_skip\_destroy](#input\_cloudwatch\_log\_group\_skip\_destroy) | Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state | `bool` | `null` | no |
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | A map of additional tags to add to the cloudwatch log group created | `map(string)` | `{}` | no |
| <a name="input_cloudwatch_log_group_use_name_prefix"></a> [cloudwatch\_log\_group\_use\_name\_prefix](#input\_cloudwatch\_log\_group\_use\_name\_prefix) | Determines whether the log group name should be prefixed with the `cloudwatch_log_group_name` provided | `bool` | `true` | no |
| <a name="input_copy_tags_to_backups"></a> [copy\_tags\_to\_backups](#input\_copy\_tags\_to\_backups) | A boolean flag indicating whether tags on the file system should be copied to backups. Defaults to `false` | `bool` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ resource "aws_cloudwatch_log_group" "this" {
retention_in_days = var.cloudwatch_log_group_retention_in_days
kms_key_id = var.cloudwatch_log_group_kms_key_id
log_group_class = var.cloudwatch_log_group_class
skip_destroy = var.cloudwatch_log_group_skip_destroy

tags = merge(
var.tags,
Expand Down
6 changes: 6 additions & 0 deletions modules/windows/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ variable "cloudwatch_log_group_class" {
default = null
}

variable "cloudwatch_log_group_skip_destroy" {
description = "Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state"
type = bool
default = null
}

variable "cloudwatch_log_group_tags" {
description = "A map of additional tags to add to the cloudwatch log group created"
type = map(string)
Expand Down
2 changes: 1 addition & 1 deletion modules/windows/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
2 changes: 2 additions & 0 deletions wrappers/lustre/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module "wrapper" {
cloudwatch_log_group_kms_key_id = try(each.value.cloudwatch_log_group_kms_key_id, var.defaults.cloudwatch_log_group_kms_key_id, null)
cloudwatch_log_group_name = try(each.value.cloudwatch_log_group_name, var.defaults.cloudwatch_log_group_name, null)
cloudwatch_log_group_retention_in_days = try(each.value.cloudwatch_log_group_retention_in_days, var.defaults.cloudwatch_log_group_retention_in_days, 90)
cloudwatch_log_group_skip_destroy = try(each.value.cloudwatch_log_group_skip_destroy, var.defaults.cloudwatch_log_group_skip_destroy, null)
cloudwatch_log_group_tags = try(each.value.cloudwatch_log_group_tags, var.defaults.cloudwatch_log_group_tags, {})
cloudwatch_log_group_use_name_prefix = try(each.value.cloudwatch_log_group_use_name_prefix, var.defaults.cloudwatch_log_group_use_name_prefix, true)
copy_tags_to_backups = try(each.value.copy_tags_to_backups, var.defaults.copy_tags_to_backups, false)
Expand All @@ -25,6 +26,7 @@ module "wrapper" {
data_repository_associations_timeouts = try(each.value.data_repository_associations_timeouts, var.defaults.data_repository_associations_timeouts, {})
deployment_type = try(each.value.deployment_type, var.defaults.deployment_type, null)
drive_cache_type = try(each.value.drive_cache_type, var.defaults.drive_cache_type, null)
efa_enabled = try(each.value.efa_enabled, var.defaults.efa_enabled, null)
file_cache_copy_tags_to_data_repository_associations = try(each.value.file_cache_copy_tags_to_data_repository_associations, var.defaults.file_cache_copy_tags_to_data_repository_associations, null)
file_cache_kms_key_id = try(each.value.file_cache_kms_key_id, var.defaults.file_cache_kms_key_id, null)
file_cache_lustre_configuration = try(each.value.file_cache_lustre_configuration, var.defaults.file_cache_lustre_configuration, {})
Expand Down
2 changes: 1 addition & 1 deletion wrappers/lustre/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
2 changes: 1 addition & 1 deletion wrappers/ontap/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
2 changes: 1 addition & 1 deletion wrappers/openzfs/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}
1 change: 1 addition & 0 deletions wrappers/windows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module "wrapper" {
cloudwatch_log_group_kms_key_id = try(each.value.cloudwatch_log_group_kms_key_id, var.defaults.cloudwatch_log_group_kms_key_id, null)
cloudwatch_log_group_name = try(each.value.cloudwatch_log_group_name, var.defaults.cloudwatch_log_group_name, null)
cloudwatch_log_group_retention_in_days = try(each.value.cloudwatch_log_group_retention_in_days, var.defaults.cloudwatch_log_group_retention_in_days, 90)
cloudwatch_log_group_skip_destroy = try(each.value.cloudwatch_log_group_skip_destroy, var.defaults.cloudwatch_log_group_skip_destroy, null)
cloudwatch_log_group_tags = try(each.value.cloudwatch_log_group_tags, var.defaults.cloudwatch_log_group_tags, {})
cloudwatch_log_group_use_name_prefix = try(each.value.cloudwatch_log_group_use_name_prefix, var.defaults.cloudwatch_log_group_use_name_prefix, true)
copy_tags_to_backups = try(each.value.copy_tags_to_backups, var.defaults.copy_tags_to_backups, null)
Expand Down
2 changes: 1 addition & 1 deletion wrappers/windows/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.53"
version = ">= 5.82"
}
}
}

0 comments on commit 1a5e0e6

Please sign in to comment.