Skip to content

Commit 5a8658d

Browse files
add example to terraform snippet
1 parent b29859a commit 5a8658d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/admin/external-auth.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ You can now add the following code to any template. This will add a button to th
7373
data "coder_external_auth" "<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>" {
7474
id = "<USER_DEFINED_ID>"
7575
}
76+
77+
# Github Example (CODER_EXTERNAL_AUTH_0_ID="github-auth")
78+
# makes a github authentication token available at data.coder_external_auth.github.access_token
79+
data "coder_external_auth" "github" {
80+
id = "github-auth"
81+
}
82+
7683
```
7784

7885
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.

0 commit comments

Comments
 (0)