Skip to content

subnet_ids not optional #374

@jam01

Description

@jam01

Description

subnet_ids is declared as optional, but is required per the implementation, leading to an error.

  • ✋ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions