Skip to content

Add new coder_parameter datasource to terraform, and process these during template imports #3906

Closed as not planned
@deansheather

Description

@deansheather

Add a new datasource type coder_parameter which can be used instead of native terraform variables:

data "coder_parameter" "test" {
  title = "this is a test var"
  description = "hi"
  type = "number"
  level = "workspace"
  immutable = true
  required = true

  validation = {
    max = 10
    min = 0
    regex = "(?i)^s"
    # options only applies for type = "string"
    options = [
      {
        name = "option 1"
        value = "option_1"
        description = "option 1 description"
      }
    ]
  }
}

and used like data.coder_parameter.test.value (syntax subject to change).

Also, process these objects during plans so we can store them as parameters in the database as well as their validations and stuff.

Metadata

Metadata

Assignees

Labels

staleThis issue is like stale bread.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions