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

[bug] Invalid value for input variable 'authentication' #1028

Closed
viniciusdc opened this issue Feb 4, 2022 · 0 comments · Fixed by #1029
Closed

[bug] Invalid value for input variable 'authentication' #1028

viniciusdc opened this issue Feb 4, 2022 · 0 comments · Fixed by #1029
Labels
area: terraform 💾 status: in progress 🏗 This task is currently being worked on type: bug 🐛 Something isn't working

Comments

@viniciusdc
Copy link
Contributor

viniciusdc commented Feb 4, 2022

Describe the bug

0.4.0 test tracker: #976

During deployment, qhub 0.4.0.dev64+g25b2eaa on local minikube and aws, me and @iameskild noticed the following error during deployment when using Auth0/Github based auth:

INFO:qhub.provider.terraform:terraform apply directory=stages/06-kubernetes-keycloak-configuration targets=[]
INFO:qhub.provider.terraform: terraform at /tmp/terraform/1.0.5/terraform
[terraform]: ╷
[terraform]: │ Error: Invalid value for input variable
[terraform]: │ 
[terraform]: │   on /tmp/tmp_hmra46m.tfvars.json line 1:
[terraform]: │    1: {"realm": "qhub-thisisatest", "authentication": {"type": "Auth0", "config": {"client_id": "***************************", "client_secret": "***************************", "auth0_subdomain": "***************************"}}}
[terraform]: │ 
[terraform]: │ The given value is not valid for variable "authentication": all map
[terraform]: │ elements must have the same type.
[terraform]: ╵

the above issue is due to the fact that terraform expects a map of one type variable for authentication which is not the case, as its receiving from input a string and map as its values, see for reference this issue/comment.

The following change will fix the above issue:

variable "authentication" {
  description = "Authentication configuration for keycloak"
  type = object({
    type = string
    config = map(string)
  })
}

edit. Due to some restrictions created with the usage of object as type, another more general option type = any is more advantageous.

Expected behavior

  • authentication variable should be correctly loaded into terraform
@viniciusdc viniciusdc added area: terraform 💾 status: in progress 🏗 This task is currently being worked on type: bug 🐛 Something isn't working labels Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: terraform 💾 status: in progress 🏗 This task is currently being worked on type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant