Thanks to visit codestin.com
Credit goes to github.com

Skip to content

List default not working with custom plugins #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dreadster3 opened this issue May 21, 2024 · 0 comments
Open

List default not working with custom plugins #772

dreadster3 opened this issue May 21, 2024 · 0 comments
Labels

Comments

@dreadster3
Copy link

dreadster3 commented May 21, 2024

Describe the bug

When generating documentation of terraform code that contains an object variable where one of the properties is a list which contains a default, terraform docs is not able to generate the docs and returns this error.

Error: gob: type not registered for interface: []interface {}

How can we reproduce it?

Clone the tfdocs-format-template. Then, create a terraform code that contains a variable such as this one

variable "some_variable" {
  description = "some description"
  type = object({
    property = list(string)
  })
  default = {
    property = [] # or ["any_string"]
  }
}

Finally try to generate the documentation from that using the custom plugin.

Environment information

❯ terraform-docs --version
terraform-docs version v0.17.0 darwin/arm64

❯ go version
go version go1.22.3 darwin/arm64
@dreadster3 dreadster3 added the bug label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant