Skip to content

Tapir fails to generate any documentation when using new optional(TYPE, DEFAULT) syntax with default values #499

@KenSpur

Description

@KenSpur

Hi 👋

It seems that the current terraform-docs integration cannot handle the new optional object attribute syntax with default values

For example, this is fine:

variable "example" {
  type = object({
    example = optional(string)
  })
}

But this breaks documentation generation:

variable "example" {
  type = object({
    example = optional(string, "")
  })
}

Problem

If a module contains any variable using the optional(TYPE, DEFAULT) form, no documentation is generated at all. This includes unrelated variables — the entire module's documentation output is empty.

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