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

Generate doc failed if "type" present in object definition #170

Open
eservent opened this issue Sep 25, 2019 · 0 comments
Open

Generate doc failed if "type" present in object definition #170

eservent opened this issue Sep 25, 2019 · 0 comments

Comments

@eservent
Copy link

eservent commented Sep 25, 2019

Hello,
I tried to use /bin/terraform-docs.awk to generate documentation with terraform-docs.

An error occured with this variable from provider aws, resource "aws_ecs_service", property "ordered_placement_strategy" :

variable "ordered_placement_strategy" {
  type = list(object({
    type  = string
    field = string
  }))
  description = "Ordered task placement strategy on EC2 instances"
  default = [
    {
      type  = "spread"
      field = "attribute:ecs.availability-zone"
    }
  ]
}

Due to presence of "type" in the object definition, and default value, awk transformation failed to retrieve a valid hcl0.11 content.

Transformation result :

variable "ordered_placement_strategy" {
  type = "object"
  type = "string"
  description = "Ordered task placement strategy on EC2 instances"
  default = [
    {
  type = "spread"
}

Thank you for the awk hack anyway 👍

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

No branches or pull requests

1 participant