Skip to content

Not converting list objects #128

@Chaouki-Tiouassiouine

Description

@Chaouki-Tiouassiouine

I have this variables.tf which contains a list as objects

variable "configure_teams" {
  type = list(object({
    name        = string
    description = string
    privacy     = optional(string, "closed")
    parent_team = optional(string)
    members     = optional(list(string))
  }))
  default = []
}

When using hcl2json command, it outputs:

{
  "variable": {
    "configure_teams": {
      "default": null,
      "type": "list(object({\r\n    name        = string\r\n    description = string\r\n    privacy     = optional(string, \"closed\")\r\n    parent_team = optional(string)\r\n    members     = optional(list(string))\r\n  }))"
    }
  }
}

which is not desirable.

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