Skip to content

Commit 916c3af

Browse files
cinaciocloudpossebotRothAndrewirldlundgren
authored
Do not set iops and throughput for non-supporting volume types (#142)
* Do not set iops and throughput for non-supporting volume types * Auto Format * Add ability to configure instance tenancy (#141) * Turn tenancy validation message into English prose (#144) Adds a period at the end of the error message. * Support AWS partition for SSM resources (#148) * Support AWS partition for SSM resources * Updated README.md Co-authored-by: actions-bot <[email protected]> * Updated README.md * update github workflows --------- Co-authored-by: cloudpossebot <[email protected]> Co-authored-by: Andy Roth <[email protected]> Co-authored-by: Iain R. Learmonth <[email protected]> Co-authored-by: David Lundgren <[email protected]> Co-authored-by: actions-bot <[email protected]> Co-authored-by: Joe Niland <[email protected]>
1 parent cbb3927 commit 916c3af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ locals {
77
instance_profile = local.instance_profile_count == 0 ? var.instance_profile : join("", aws_iam_instance_profile.default.*.name)
88
security_group_enabled = module.this.enabled && var.security_group_enabled
99
region = var.region != "" ? var.region : data.aws_region.default.name
10-
root_iops = contains(["io1", "io2", "gp3"], var.root_volume_type) ? var.root_iops : "0"
11-
ebs_iops = contains(["io1", "io2", "gp3"], var.ebs_volume_type) ? var.ebs_iops : "0"
12-
root_throughput = var.root_volume_type == "gp3" ? var.root_throughput : "0"
13-
ebs_throughput = var.ebs_volume_type == "gp3" ? var.ebs_throughput : "0"
10+
root_iops = contains(["io1", "io2", "gp3"], var.root_volume_type) ? var.root_iops : null
11+
ebs_iops = contains(["io1", "io2", "gp3"], var.ebs_volume_type) ? var.ebs_iops : null
12+
root_throughput = var.root_volume_type == "gp3" ? var.root_throughput : null
13+
ebs_throughput = var.ebs_volume_type == "gp3" ? var.ebs_throughput : null
1414
availability_zone = var.availability_zone != "" ? var.availability_zone : data.aws_subnet.default.availability_zone
1515
ami = var.ami != "" ? var.ami : join("", data.aws_ami.default.*.image_id)
1616
ami_owner = var.ami != "" ? var.ami_owner : join("", data.aws_ami.default.*.owner_id)

0 commit comments

Comments
 (0)