Skip to content

Null values for some arguments cause Terraform errors #55

Open
@mpaluchowski

Description

@mpaluchowski

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Terraform is throwing errors for the var.unauthenticated_priority variable being null -- which is its default value. This is probably due to issue 24142 reported in Terraform.

╷
│ Error: Operation failed
│ 
│   on .terraform/modules/ci_alb_ingress/main.tf line 180, in resource "aws_lb_listener_rule" "unauthenticated_hosts":
│  180:   priority     = var.unauthenticated_priority > 0 ? var.unauthenticated_priority + count.index : null
│     ├────────────────
│     │ var.unauthenticated_priority is null
│ 
│ Error during operation: argument must not be null.
╵

Expected Behavior

The default value should be such that no error is thrown.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add a module using terraform-aws-alb-ingress
  2. omit passing the unauthenticated_priority parameter.
  3. Run terraform apply
  4. See error

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: Linux Ubuntu 21.04, Terraform 1.0.6
  • Version 0.24.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions