Skip to content

Commit

Permalink
Fixed enquoted types in terraform_docs (fixed #52)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Jun 25, 2019
1 parent 3147a7c commit 8362915
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion terraform_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "\""
}
}
}
}
Expand Down

0 comments on commit 8362915

Please sign in to comment.