terraform-aws-ec2-instance
terraform-aws-ec2-instance copied to clipboard
ebs_throughput default value is out of range
When using 0.44.0 I get
│ Error: expected throughput to be in the range (125 - 1000), got 0 │ │ with module.instance.aws_ebs_volume.default[0], │ on .terraform/modules/instance/main.tf line 178, in resource "aws_ebs_volume" "default": │ 178: throughput = local.ebs_throughput
the issue is caused by the ebs_throughput default which is set to 0 but it needs to be between 125 and 1000 i.e.
ebs_throughput = var.ebs_volume_type == "gp3" ? var.ebs_throughput : "0"
should be for example
ebs_throughput = var.ebs_volume_type == "gp3" ? var.ebs_throughput : "125"