Coder.comC
Coder.com16mo ago
42 replies
tsá

I am trying to setup Git Auth with Coder Envbuilder

I'm trying to set up GitHub authentication with Coder's Envbuilder, but I'm a bit lost when it comes to configuring Terraform.

Here's what I've done so far:
I briefly looked at the .tf file and placed the coder_external_auth block below the coder_workspace_owner.

data "coder_workspace_owner" "me" {}

data "coder_external_auth" "github" {
  id = "github"
}


I then added this:

locals {
  envbuilder_env = {
    # ENVBUILDER_GIT_URL and ENVBUILDER_CACHE_REPO will be overridden by the provider
    # if the cache repo is enabled.
    "ENVBUILDER_GIT_USERNAME" : data.coder_external_auth.github.access_token,
    "ENVBUILDER_GIT_URL" : local.repo_url,
  }
  # ...
}


before ENVBUILDER_GIT_URL.

Thanks in advance for your help!
Was this page helpful?