File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
examples/resources/coder_metadata Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,26 @@ resource "kubernetes_pod" "dev" {
20
20
count = data.coder_workspace.me.start_count
21
21
}
22
22
23
+ resource "tls_private_key" "example_key_pair" {
24
+ algorithm = "ECDSA"
25
+ ecdsa_curve = "P256"
26
+ }
27
+
23
28
resource "coder_metadata" "pod_info" {
24
29
count = data.coder_workspace.me.start_count
25
30
resource_id = kubernetes_pod.dev[0].id
31
+ pair {
32
+ key = "description"
33
+ value = "This description will show up in the Coder dashboard."
34
+ }
26
35
pair {
27
36
key = "pod_uid"
28
37
value = kubernetes_pod.dev[0].uid
29
38
}
39
+ pair {
40
+ key = "public_key"
41
+ value = tls_private_key.example_key.public_key_openssh
42
+ }
30
43
}
31
44
```
32
45
Original file line number Diff line number Diff line change @@ -5,11 +5,26 @@ resource "kubernetes_pod" "dev" {
5
5
count = data. coder_workspace . me . start_count
6
6
}
7
7
8
+ resource "tls_private_key" "example_key_pair" {
9
+ algorithm = " ECDSA"
10
+ ecdsa_curve = " P256"
11
+ }
12
+
8
13
resource "coder_metadata" "pod_info" {
9
14
count = data. coder_workspace . me . start_count
10
15
resource_id = kubernetes_pod. dev [0 ]. id
16
+ pair {
17
+ key = " description"
18
+ value = " This description will show up in the Coder dashboard."
19
+ }
11
20
pair {
12
21
key = " pod_uid"
13
22
value = kubernetes_pod. dev [0 ]. uid
14
23
}
24
+ pair {
25
+ key = " public_key"
26
+ value = tls_private_key. example_key . public_key_openssh
27
+ # The value of this item will be hidden from view by default
28
+ sensitive = true
29
+ }
15
30
}
You can’t perform that action at this time.
0 commit comments