Skip to content

docs: update external auth to better explain process #15970

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

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add example to terraform snippet
  • Loading branch information
ChristopherJTrent committed Dec 28, 2024
commit 5a8658d8c97a6c7cf3e5c6668c25384b3418b64f
7 changes: 7 additions & 0 deletions docs/admin/external-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
export DOCKER_GROUP=$(getent group docker | cut -d: -f3)
docker run --rm -it \
-e CODER_ACCESS_URL="https://coder.example.com" \
-e CODER_PG_CONECTION_URL="postgresql://username:password@database/coder" \

Check warning on line 54 in docs/admin/external-auth.md

View workflow job for this annotation

GitHub Actions / lint

"CONECTION" should be "CONNECTION".
-e CODER_EXTERNAL_AUTH_0_ID="<USER_DEFINED_ID>" \
-e CODER_EXTERNAL_AUTH_0_TYPE="<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>" \
-e CODER_EXTERNAL_AUTH_0_CLIENT_ID="<OAuth app client ID>" \
Expand All @@ -73,6 +73,13 @@
data "coder_external_auth" "<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>" {
id = "<USER_DEFINED_ID>"
}

# Github Example (CODER_EXTERNAL_AUTH_0_ID="github-auth")
# makes a github authentication token available at data.coder_external_auth.github.access_token
data "coder_external_auth" "github" {
id = "github-auth"
}

```

Inside your terraform code, you now have access to authentication variables. Reference the documentation for your chosen provider for more information on how to supply it with a token.
Expand Down
Loading