crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
290 stars 38 forks source link

cannot build the Types: got type "map[string]string" for field "Data", only types "string" and "*string" supported as sensitive #208

Closed ytsarev closed 2 years ago

ytsarev commented 2 years ago

What happened?

The attempt to generate rancher2_secret resource in the context of https://github.com/AbsaOSS/provider-jet-rancher failed with

make generate
16:39:29 [ .. ] verify dependencies have expected content
all modules verified
16:39:34 [ OK ] go modules dependencies verified
16:39:34 [ .. ] go generate darwin_amd64
panic: cannot generate crd for resource rancher2_secret: cannot build types for Secret: cannot build the Types: got type "map[string]string" for field "Data", only types "string" and "*string" supported as sensitive

goroutine 1 [running]:
github.com/crossplane/terrajet/pkg/pipeline.Run(0xc000160600, 0xc000832570, 0x28)
    /Users/xxx/absa/provider-jet-rancher/.work/pkg/pkg/mod/github.com/turkenh/terrajet@v0.0.0-20220114225802-9f11209e5cac/pkg/pipeline/run.go:76 +0x1db3
main.main()
    /Users/xxx/absa/provider-jet-rancher/cmd/generator/main.go:48 +0xad
exit status 2
apis/generate.go:32: running "go": exit status 1

How can we reproduce it?

Clone https://github.com/AbsaOSS/provider-jet-rancher, remove limiting WithIncludeList from config/provider.go and run make generate

ulucinar commented 2 years ago

Hi @ytsarev, @sergenyalcin is working on the related issue #100. Please see this comment on that issue.

@sergenyalcin, are you planning to add support for map types in your open PR?

sergenyalcin commented 2 years ago

Hi @ytsarev, @sergenyalcin is working on the related issue #100. Please see this comment on that issue.

@sergenyalcin, are you planning to add support for map types in your open PR?

Hi @ulucinar yes, I am working to add support for map types in my PR.