Skip to content

Commit d1bb834

Browse files
committed
Add missing 'resources' template
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
1 parent 60c1388 commit d1bb834

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

engine/engine.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func (e *engine) Print(module terraform.Module, settings *print.Settings) (strin
3939
&template.Item{Name: "outputs", Text: tplOutputs},
4040
&template.Item{Name: "requirements", Text: tplRequirements},
4141
&template.Item{Name: "providers", Text: tplProviders},
42+
&template.Item{Name: "resources", Text: tplResources},
4243
)
4344

4445
rendered, err := tpl.Render(module)

engine/sections.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const (
7474
No resources.
7575
{{ else }}
7676
{{- range .Module.Resources }}
77-
- {{ .Name }}
77+
- {{ .ProviderName }}
7878
{{- end }}
7979
{{- end }}
8080
{{ end -}}
@@ -87,7 +87,7 @@ const (
8787
No providers.
8888
{{ else }}
8989
{{- range .Module.Providers }}
90-
- {{ .ProviderName }}
90+
- {{ .Name }}
9191
{{- end }}
9292
{{- end }}
9393
{{ end -}}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/kr/pretty v0.1.0 // indirect
1010
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
1111
github.com/stretchr/testify v1.6.1 // indirect
12-
github.com/terraform-docs/plugin-sdk v0.0.0-20210202170709-80cd47c11513
12+
github.com/terraform-docs/plugin-sdk v0.0.0-20210202180943-30b472ab91d4
1313
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
1414
golang.org/x/text v0.3.2 // indirect
1515
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
5454
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
5555
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
5656
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
57-
github.com/terraform-docs/plugin-sdk v0.0.0-20210202170709-80cd47c11513 h1:EzsbEhS4+5OnNtumV/R5+zop7Nq9a9fggDSGc94gT2c=
58-
github.com/terraform-docs/plugin-sdk v0.0.0-20210202170709-80cd47c11513/go.mod h1:PLyj3sRriR94Ixep7cRJI9KIlJEcI3SSuVE3BdniyS0=
57+
github.com/terraform-docs/plugin-sdk v0.0.0-20210202180943-30b472ab91d4 h1:7Pno/WMFhUkjIBjodZNkYvXl2WA/+XWD0vRXy1Tg1to=
58+
github.com/terraform-docs/plugin-sdk v0.0.0-20210202180943-30b472ab91d4/go.mod h1:PLyj3sRriR94Ixep7cRJI9KIlJEcI3SSuVE3BdniyS0=
5959
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
6060
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
6161
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

0 commit comments

Comments
 (0)