Skip to content

Commit 4f83857

Browse files
committed
Worked around a problem with the AWS provider where iops have to be specified even if the mode is AUTOMATIC.
1 parent 1381b73 commit 4f83857

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Terraform/deploy-fsx-ontap/module/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" {
3232
dynamic "disk_iops_configuration" {
3333
for_each = var.disk_iops_configuration != null ? [var.disk_iops_configuration] : []
3434
content {
35-
iops = (disk_iops_configuration.value["iops"] != null ? disk_iops_configuration.value["iops"] : 0)
35+
iops = disk_iops_configuration.value["iops"]
3636
mode = disk_iops_configuration.value["mode"]
3737
}
3838
}

Terraform/deploy-fsx-ontap/module/variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ variable "daily_backup_start_time" {
114114
}
115115

116116
variable "disk_iops_configuration" {
117-
description = "The SSD IOPS configuration for the Amazon FSx for NetApp ONTAP file system"
117+
description = "The SSD IOPS configuration for the file system. Valid modes are "AUTOMATIC (3 iops per GB provided) or USER_PROVISIONED with a maxmimum of 160,000 iops. Note, both 'mode' and 'iops' are required, so if setting to AUTOMATIC, set iops to null."
118118
type = map(any)
119119
default = {
120120
mode = "AUTOMATIC"
121+
iops = null
121122
}
122123
}
123124

0 commit comments

Comments
 (0)