Coder.comC
Coder.com3y ago
3 replies
Bianca

does not support data source "coder_git_auth"

Hello!

I have deployed coder's helm chart to our kubernetes cluster and created a template with envbox. I've tried to configure our gitlab as a git auth provider. When I build my template it says "The provider coder/coder does not support data source "coder_git_auth"
** for privacy purposes I've hidden or replaced our domains.

coder gitauth config
- name: CODER_GITAUTH_0_ID value: "primary-gitlab" - name: CODER_GITAUTH_0_TYPE value: "gitlab" - name: CODER_GITAUTH_0_CLIENT_ID value: "xxx" - name: CODER_GITAUTH_0_CLIENT_SECRET value: "xxx" - name: CODER_GITAUTH_0_AUTH_URL value: "https://gitlab.example.com/oauth/authorize" - name: CODER_GITAUTH_0_TOKEN_URL value: "https://gitlab.example.com/oauth/token" - name: CODER_GITAUTH_0_VALIDATE_URL value: "https://gitlab.example.comoauth/token/info"

template config

data "coder_git_auth" "gitlab" { # Matches the ID of the git auth provider in Coder. id = "primary-gitlab" } resource "coder_agent" "dev" { os = "linux" arch = "amd64" dir = "~/coder" env = { GITHUB_TOKEN : data.coder_git_auth.gitlab.access_token } startup_script = <<EOF if [ ! -d ~/coder ]; then git clone https://gitlab.example.com/sre/wiki.git fi EOF }

And attached is a screenshot of our added git provider, although I'm not sure what "Not Set" under Match means

Thanks for the help!
2023-08-21_09-44.png
Was this page helpful?