Skip to content
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

terraform-docs should not fail if complex types contain 'description' keyword #174

Closed
wants to merge 6 commits into from

Conversation

cytopia
Copy link
Contributor

@cytopia cytopia commented Nov 2, 2019

Fix description key inside type

This PR fixes a when a key named description is inside the type block of a variable section:

variable "ingress_cidr_blocks" {
  description = "Bzzzzz"
  type = list(
    object({
      description = string
      cidr_blocks = string
      from_port   = number
      to_port     = number
      protocol    = string
    })
  )

  default = [
    {
      description = "SG"
      cidr_blocks = "10.0.0.0/32"
      from_port   = 22
      to_port     = 22
      protocol    = "tcp"
    },
  ]
}

Integration tests

Test for this can be found here: https://github.com/cytopia/docker-terraform-docs/blob/master/tests/0.12/main.tf#L60

Reliability

I tried to fix this to the best of my knowledge and currently available test cases. Please do test this before merging on existing files.

@cytopia
Copy link
Contributor Author

cytopia commented Jan 23, 2020

@osterman I assume this can be closed, as the new terraform-docs now handles TF >= 0.12 quite well.

@maximmi
Copy link
Contributor

maximmi commented Mar 27, 2020

@cytopia thanks, will close this one then

@maximmi maximmi closed this Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants