File tree 2 files changed +26
-0
lines changed 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,32 @@ A catch-all variation of this approach is dynamically provisioning a cloud servi
55
55
for each workspace and then making the relevant secrets available via the cloud's secret management
56
56
system.
57
57
58
+ ## Displaying Secrets
59
+
60
+ While you can inject secrets into the workspace via environment variables, you
61
+ can also show them in the Workspace UI with [ ` coder_metadata ` ] ( https://registry.terraform.io/providers/coder/coder/latest/docs/resources/metadata ) .
62
+
63
+ ![ secret UI] ( ./images/secret-metadata-ui.png )
64
+
65
+ Can be produced with
66
+
67
+ ``` hcl
68
+ resource "twilio_iam_api_key" "api_key" {
69
+ account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
70
+ friendly_name = "Test API Key"
71
+ }
72
+
73
+
74
+ resource "coder_metadata" "twilio_key" {
75
+ resource_id = twilio_iam_api_key.api_key.id
76
+ item {
77
+ key = "secret"
78
+ value = twilio_iam_api_key.api_key.secret
79
+ sensitive = true
80
+ }
81
+ }
82
+ ```
83
+
58
84
## Coder SSH Key
59
85
60
86
Coder automatically inserts an account-wide SSH key into each workspace. In MacOS
You can’t perform that action at this time.
0 commit comments