Skip to content

Commit 180e10c

Browse files
committed
require curl and jq
1 parent a45706a commit 180e10c

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

github-upload-public-key/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,18 @@ tags: [helper, git]
1111

1212
Templates that utilize Github External Auth can automatically ensure that the Coder public key is uploaded to Github so that users can clone repositories without needing to upload the public key themselves.
1313

14-
# Example
15-
1614
```tf
17-
data "coder_external_auth" "github" {
18-
id = "myauthid"
19-
}
20-
2115
module "github-upload-public-key" {
2216
source = "registry.coder.com/modules/github-upload-public-key/coder"
2317
version = "1.0.13"
2418
agent_id = coder_agent.example.id
25-
external_auth_id = data.coder_external_auth.github.id
2619
}
2720
```
2821

2922
# Requirements
3023

24+
This module requires `curl` and `jq` to be installed inside your workspace.
25+
3126
Github External Auth must be enabled in the workspace for this module to work. The Github app that is configured for external auth must have both read and write permissions to "Git SSH keys" in order to upload the public key. Additionally, a Coder admin must also have the `admin:public_key` scope added to the external auth configuration of the Coder deployment. For example:
3227

3328
```
@@ -39,3 +34,20 @@ CODER_EXTERNAL_AUTH_0_SCOPES="repo,workflow,admin:public_key"
3934
```
4035

4136
Note that the default scopes if not provided are `repo,workflow`. If the module is failing to complete after updating the external auth configuration, instruct users of the module to "Unlink" and "Link" their Github account in the External Auth user settings page to get the new scopes.
37+
38+
# Example
39+
40+
Using a coder github external auth with a non-default id: (default is `github`)
41+
42+
```tf
43+
data "coder_external_auth" "github" {
44+
id = "myauthid"
45+
}
46+
47+
module "github-upload-public-key" {
48+
source = "registry.coder.com/modules/github-upload-public-key/coder"
49+
version = "1.0.13"
50+
agent_id = coder_agent.example.id
51+
external_auth_id = data.coder_external_auth.github.id
52+
}
53+
```

0 commit comments

Comments
 (0)