page_title | subcategory | description |
---|---|---|
coder_metadata Resource - terraform-provider-coder |
Use this resource to attach key/value pairs to a resource. They will be displayed in the Coder dashboard. |
Use this resource to attach key/value pairs to a resource. They will be displayed in the Coder dashboard.
data "coder_workspace" "me" {
}
resource "kubernetes_pod" "dev" {
count = data.coder_workspace.me.start_count
}
resource "tls_private_key" "example_key_pair" {
algorithm = "ECDSA"
ecdsa_curve = "P256"
}
resource "coder_metadata" "pod_info" {
count = data.coder_workspace.me.start_count
resource_id = kubernetes_pod.dev[0].id
item {
key = "description"
value = "This description will show up in the Coder dashboard."
}
item {
key = "pod_uid"
value = kubernetes_pod.dev[0].uid
}
item {
key = "public_key"
value = tls_private_key.example_key_pair.public_key_openssh
# The value of this item will be hidden from view by default
sensitive = true
}
}
item
(Block List, Min: 1) Each "item" block defines a single metadata item consisting of a key/value pair. (see below for nested schema)resource_id
(String) The "id" property of another resource that metadata should be attached to.
hide
(Boolean) Hide the resource from the UI.icon
(String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon withdata.coder_workspace.me.access_url + "/icons/<path>"
.
id
(String) The ID of this resource.
Required:
key
(String) The key of this metadata item.
Optional:
sensitive
(Boolean) Set to "true" to for items such as API keys whose values should be hidden from view by default. Note that this does not prevent metadata from being retrieved using the API, so it is not suitable for secrets that should not be exposed to workspace users.value
(String) The value of this metadata item.
Read-Only:
is_null
(Boolean)