Skip to content

feat: Support more complex type whens defaulting TF vars #115

@aclevername

Description

@aclevername

The merging of #113 in release v0.6.1 added support for basic defaults, e.g.:

variable "timeout_seconds" {
  type        = number
  description = "Timeout for each request"
  default     = 120
}

Produces API field:

                timeout_seconds:
                  default: "120"
                  description: Timeout for each request
                  type: number

However it did not support more complex defaults, such as variables with:

variable "ports" {
  type = object({
    name = string
    port = number
  })
  description = "Port which the container listens to (http1 or h2c)"
  default = {
    name = "http1"
    port = 8080
  }
}

The default being an object presented more complexity and requires further exploration and testing of edge cases before it can be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions