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

feat: make terradoc output improvements #33

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/parser/hclparser/hcltype.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func varFunctions() map[string]function.Function {

func outputFunctions() map[string]function.Function {
return map[string]function.Function{
"module": complexTypeFunc(types.TerraformModule),
"resource": complexTypeFunc(types.TerraformResource),
"object": complexTypeFunc(types.TerraformObject),
"map": nestedTypeFunc(types.TerraformMap),
Expand Down
3 changes: 3 additions & 0 deletions internal/types/terraform_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
TerraformObject // object
TerraformTuple // tuple
TerraformResource // resource
TerraformModule // module
)

func TerraformTypes(typename string) (TerraformType, bool) {
Expand All @@ -37,6 +38,8 @@ func TerraformTypes(typename string) (TerraformType, bool) {
return TerraformTuple, true
case TerraformResource.String():
return TerraformResource, true
case TerraformModule.String():
return TerraformModule, true
}

return TerraformEmptyType, false
Expand Down
5 changes: 3 additions & 2 deletions internal/types/terraformtype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.