You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `CODER_EXTERNAL_AUTH_0_ID` environment variable is used for internal
27
65
reference. Therefore, it can be set arbitrarily (e.g., `primary-github` for your
28
66
GitHub provider).
29
67
68
+
</div>
69
+
70
+
You can now add the following code to any template. This will add a button to the workspace setup page which will allow you to authenticate with your provider.
71
+
72
+
```tf
73
+
data "coder_external_auth" "<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>" {
74
+
id = "<USER_DEFINED_ID>"
75
+
}
76
+
```
77
+
78
+
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.
79
+
30
80
## GitHub
31
81
32
82
> If you don't require fine-grained access control, it's easier to configure a
0 commit comments