Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation.condition of additional_thumbprints has not been completed (v1.3.0) #25

Closed
officel opened this issue Mar 26, 2023 · 2 comments

Comments

@officel
Copy link
Contributor

officel commented Mar 26, 2023

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

@Antvirf
Copy link
Contributor

Antvirf commented Mar 27, 2023

Ran into this just now and submitted PR #26

@unfunco
Copy link
Owner

unfunco commented Mar 27, 2023

Fixed in #26 – thanks both! A new release will be published shortly.

@unfunco unfunco closed this as completed Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants