terraform-aws-ecs
terraform-aws-ecs copied to clipboard
subnet_ids not optional
Description
subnet_ids is declared as optional, but is required per the implementation, leading to an error.
- [x] β I have searched the open/closed issues and my issue is not listed.
Versions
-
Module version [Required]:
-
Terraform version: v1.13.4
-
Provider version(s): v6.22.0
Reproduction Code [Required]
Not adding subnet_ids
Expected behavior
Create the task-definition
Actual behavior
Error result
Terminal Output Screenshot(s)
β Error: Error in function call
β
β on .terraform/modules/ecs_job_dbmigration/modules/service/main.tf line 1875, in data "aws_subnet" "this":
β 1875: id = element(var.subnet_ids, 0)
β βββββββββββββββββ
β β while calling element(list, index)
β β var.subnet_ids is empty list of string
β
β Call to function "element" failed: cannot use element function with an
β empty list.