From a1f1322d3e3e32a7d7dfb213e8e44050de08df52 Mon Sep 17 00:00:00 2001 From: Keren Trajtenberg Date: Mon, 29 Jan 2024 15:50:36 +0200 Subject: [PATCH 1/3] no snapshot policy --- Terraform/deploy-fsx-ontap/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terraform/deploy-fsx-ontap/main.tf b/Terraform/deploy-fsx-ontap/main.tf index 63c593e..419c74a 100644 --- a/Terraform/deploy-fsx-ontap/main.tf +++ b/Terraform/deploy-fsx-ontap/main.tf @@ -183,6 +183,6 @@ resource "aws_fsx_ontap_volume" "myvol" { security_style = var.vol_info["sec_style"] skip_final_backup = var.vol_info["skip_final_backup"] # snaplock_configuration {} - snapshot_policy = "NONE" + snapshot_policy = null tags = var.tags } From 0f1fd777ebfc7ffaa067375fe189381e13807428 Mon Sep 17 00:00:00 2001 From: Keren Trajtenberg Date: Mon, 29 Jan 2024 18:02:49 +0200 Subject: [PATCH 2/3] disk iops configuration attribute fix --- Terraform/deploy-fsx-ontap/main.tf | 10 ++++++++-- Terraform/deploy-fsx-ontap/variables.tf | 4 +--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Terraform/deploy-fsx-ontap/main.tf b/Terraform/deploy-fsx-ontap/main.tf index 419c74a..821bffd 100644 --- a/Terraform/deploy-fsx-ontap/main.tf +++ b/Terraform/deploy-fsx-ontap/main.tf @@ -146,10 +146,16 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" { automatic_backup_retention_days = var.backup_retention_days daily_automatic_backup_start_time = var.daily_backup_start_time storage_type = var.storage_type - disk_iops_configuration = var.disk_iops_configuration fsx_admin_password = var.fsx_admin_password route_table_ids = var.route_table_ids tags = var.tags + dynamic "disk_iops_configuration" { + for_each = var.disk_iops_configuration != null ? [var.disk_iops_configuration] : [] + content { + iops = disk_iops_configuration.value["iops"] + mode = disk_iops_configuration.value["mode"] + } + } # endpoint_ip_address_range = "" } @@ -183,6 +189,6 @@ resource "aws_fsx_ontap_volume" "myvol" { security_style = var.vol_info["sec_style"] skip_final_backup = var.vol_info["skip_final_backup"] # snaplock_configuration {} - snapshot_policy = null + # snapshot_policy {} tags = var.tags } diff --git a/Terraform/deploy-fsx-ontap/variables.tf b/Terraform/deploy-fsx-ontap/variables.tf index 6cba2f0..ace4555 100644 --- a/Terraform/deploy-fsx-ontap/variables.tf +++ b/Terraform/deploy-fsx-ontap/variables.tf @@ -129,9 +129,7 @@ variable "vol_info" { variable "vol_snapshot_policy" { description = "Specifies the snapshot policy for the volume" type = map(any) - default = { - "Name" = "terraform-fsxn" - } + default = null } variable "tags" { From 17b3f46eb8c49d5d090aab2ff825be5a05966cab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Jan 2024 10:44:22 +0000 Subject: [PATCH 3/3] terraform-docs: automated action --- Terraform/deploy-fsx-ontap/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terraform/deploy-fsx-ontap/README.md b/Terraform/deploy-fsx-ontap/README.md index 90051cc..251ed30 100644 --- a/Terraform/deploy-fsx-ontap/README.md +++ b/Terraform/deploy-fsx-ontap/README.md @@ -210,7 +210,7 @@ terraform apply -y | svm_name | The name of the Storage Virtual Machine | `string` | `"first_svm"` | no | | tags | Tags to be applied to the resources | `map(any)` |
{
"Name": "terraform-fsxn"
}
| no | | vol_info | Details for the volume creation | `map(any)` |
{
"bypass_sl_retention": false,
"cooling_period": 31,
"copy_tags_to_backups": false,
"efficiency": true,
"junction_path": "/vol1",
"sec_style": "UNIX",
"size_mg": 1024,
"skip_final_backup": false,
"tier_policy_name": "AUTO",
"vol_name": "vol1",
"vol_type": "RW"
}
| no | -| vol_snapshot_policy | Specifies the snapshot policy for the volume | `map(any)` |
{
"Name": "terraform-fsxn"
}
| no | +| vol_snapshot_policy | Specifies the snapshot policy for the volume | `map(any)` | `null` | no | | vpc_id | The ID of the VPC in which the FSxN fikesystem should be deployed | `string` | `"vpc-111111111"` | no | ### Outputs