Skip to content

Add ordering to coder_metadata entries #12074

Closed as not planned
Closed as not planned
@matifali

Description

@matifali

A customer reported that

resource "coder_metadata" - In the UI, this shows up in alphabetical order, whereas we would like to show up in the order we specify the keys in Terraform

But in our dogfood template, the following snippet renders in the correct order given in the template file.

resource "coder_metadata" "container_info" {
  count       = data.coder_workspace.me.start_count
  resource_id = docker_container.workspace[0].id
  item {
    key   = "memory"
    value = docker_container.workspace[0].memory
  }
  item {
    key   = "runtime"
    value = docker_container.workspace[0].runtime
  }
  item {
    key   = "region"
    value = data.coder_parameter.region.option[index(data.coder_parameter.region.option.*.value, data.coder_parameter.region.value)].name
  }
}

image

Metadata

Metadata

Assignees

Labels

customer-reportedBugs reported by enterprise customers. Only humans may set this.s3Bugs that confuse, annoy, or are purely cosmetic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions