From 6375c3469ef6cdfff15ad217eebf98d130f7691a Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 13 Jul 2019 07:45:31 +0200 Subject: [PATCH] Fix: Do not double quote TF >= 0.12 legacy quoted types (#157) --- bin/terraform-docs.awk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/terraform-docs.awk b/bin/terraform-docs.awk index 58964644..bd6b2b7f 100644 --- a/bin/terraform-docs.awk +++ b/bin/terraform-docs.awk @@ -61,7 +61,12 @@ 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 "\"" + } } } }