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

0.12 support for terraform-docs #152

Merged
merged 3 commits into from
Jun 5, 2019
Merged

0.12 support for terraform-docs #152

merged 3 commits into from
Jun 5, 2019

Conversation

osterman
Copy link
Member

@osterman osterman commented Jun 4, 2019

what

  • Add a hack to support terraform 0.12 with terraform-docs
  • Use awk to generate variables and outputs suitable for terraform-docs

why

  • terraform-docs does not yet support HCL2

references

@osterman osterman requested a review from aknysh June 4, 2019 23:01
@osterman osterman merged commit 6c0d7b6 into master Jun 5, 2019
@osterman osterman deleted the terraform-docs-hack branch June 5, 2019 01:42
goruha added a commit that referenced this pull request Jun 5, 2019
…into codefresh-wait

* 'codefresh-wait' of github.com:cloudposse/build-harness:
  0.12 support for terraform-docs (#152)
@antonbabenko
Copy link

Thanks a lot for this solution!

It works for all cases I have, but not when default value looks like this:

variable "database_outbound_acl_rules" {
  description = "Database subnets outbound network ACL rules"
  type        = list(map(string))

  default = [
    {
      rule_number = 100
      rule_action = "allow"
      from_port   = 0
      to_port     = 0
      protocol    = "-1"
      cidr_block  = "0.0.0.0/0"
    },
  ]
}

Do you know how to improve awk script to handle this?

osterman pushed a commit that referenced this pull request Jun 17, 2019
…d correctly (#155)

* #152 Ensure terraform-docs 0.12 multi-line default statement is parsed correctly

* Fix indentation
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.

3 participants