Skip to content

Cant pass null to var.tags #6

@drewmullen

Description

@drewmullen
╷
│ Error: Error in function call
│ 
│   on .terraform/modules/tags/locals.tf line 23, in locals:
│   23:   tags = try(
│   24:     # Tags are already in awscc format
│   25:     concat(local.generated_tags_awscc, var.tags),
│   26:     # Tags are in aws format. Convert to awscc format
│   27:     concat(local.generated_tags_awscc, [for k, v in var.tags : { key : k, value : v }])
│   28:   )
│     ├────────────────
│     │ local.generated_tags_awscc is tuple with 2 elements
│     │ var.tags is null
│ 
│ Call to function "try" failed: no expression succeeded:
│ - Invalid function argument (at .terraform/modules/tags/locals.tf:25,40-48)
│   Invalid value for "seqs" parameter: argument must not be null.
│ - Iteration over null value (at .terraform/modules/tags/locals.tf:27,53-61)
│   A null value cannot be used as the collection in a 'for' expression.
│ 
│ At least one expression must produce a successful result.

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