From 83629157c22800f59ab59642f82abef3df31721a Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Tue, 25 Jun 2019 14:34:46 +0200 Subject: [PATCH] Fixed enquoted types in terraform_docs (fixed #52) --- terraform_docs.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/terraform_docs.sh b/terraform_docs.sh index 464dc94..0935b69 100755 --- a/terraform_docs.sh +++ b/terraform_docs.sh @@ -169,7 +169,12 @@ terraform_docs_awk() { if (type ~ "object") { print " type = \"object\"" } else { - print " type = \"" $3 "\"" + # legacy quoted types: "string", "list", and "map" + if ($3 ~ /^[[:space:]]*"(.*?)"[[:space:]]*$/) { + print " type = " $3 + } else { + print " type = \"" $3 "\"" + } } } }