8000 validation.condition of additional_thumbprints has not been completed (v1.3.0) · Issue #25 · unfunco/terraform-aws-oidc-github · GitHub
[go: up one dir, main page]

Skip to content
validation.condition of additional_thumbprints has not been completed (v1.3.0) #25
Closed
@officel

Description

@officel

If additional_thumbprints is not required, it should not be an error to not include it in the code.

module "aws_oidc_github" {
  source = "unfunco/oidc-github/aws"
<ommit>
  # no additional_thumbprints variable
}

has error

│ Error: Invalid function argument
│
│   on .terraform/modules/aws_oidc_github/variables.tf line 21, in variable "additional_thumbprints":
│   21:     condition     = length(var.additional_thumbprints) <= 4
│     ├────────────────
│     │ while calling length(value)
│     │ var.additional_thumbprints is null
│
│ Invalid value for "value" parameter: argument must not be null.

workaround(and If additional_thumbprints is required, then)

module "aws_oidc_github" {
  source = "unfunco/oidc-github/aws"
<ommit>

  additional_thumbprints = []

}

Additional checks on condition would be nice.

like https://stackoverflow.com/questions/66912991/terraform-custom-validation-for-variable-that-can-be-null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0