Open sashasimkin opened 3 months ago
On current master
(3ab7b24) the error is different:
$ cf-terraforming -a $CF_ACC -t $CLOUDFLARE_API_TOKEN generate --resource-type cloudflare_access_application
2024/08/06 13:38:09 [DEBUG] GET https://releases.hashicorp.com/terraform/index.json
2024/08/06 13:38:10 [DEBUG] GET https://releases.hashicorp.com/terraform/1.9.3/terraform_1.9.3_SHA256SUMS.72D7468F.sig
2024/08/06 13:38:10 [DEBUG] GET https://releases.hashicorp.com/terraform/1.9.3/terraform_1.9.3_SHA256SUMS
2024/08/06 13:38:10 [DEBUG] GET https://releases.hashicorp.com/terraform/1.9.3/terraform_1.9.3_darwin_amd64.zip
panic: interface conversion: interface {} is []interface {}, not string
goroutine 1 [running]:
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.writeAttrLine({0xc0004ef498, 0x8}, {0xb9939c0, 0xc000119140}, {0x0?, 0xb99d200?}, 0xc000118f90)
/Users/x/go/pkg/mod/github.com/cloudflare/cf-terraforming@v0.20.1-0.20240802023314-3ab7b24cd8ab/internal/app/cf-terraforming/cmd/util.go:228 +0xe1d
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.writeAttrLine({0xc0004ef498, 0x8}, {0xb9969e0, 0xc000118e88}, {0x0, 0x0}, 0xc000118f90)
/Users/x/go/pkg/mod/github.com/cloudflare/cf-terraforming@v0.20.1-0.20240802023314-3ab7b24cd8ab/internal/app/cf-terraforming/cmd/util.go:275 +0x167c
github.com/x/cf-terraforming/internal/app/cf-terraforming/cmd.init.generateResources.func2(0xbecc200, {0xb828b13?, 0x4?, 0xb828a97?})
/Users/x/go/pkg/mod/github.com/cloudflare/cf-terraforming@v0.20.1-0.20240802023314-3ab7b24cd8ab/internal/app/cf-terraforming/cmd/generate.go:1328 +0x62ee
github.com/spf13/cobra.(*Command).execute(0xbecc200, {0xc000198360, 0x6, 0x6})
/Users/x/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0xbecc7c0)
/Users/x/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/Users/x/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.Execute()
/Users/x/go/pkg/mod/github.com/cloudflare/cf-terraforming@v0.20.1-0.20240802023314-3ab7b24cd8ab/internal/app/cf-terraforming/cmd/root.go:30 +0x1a
main.main()
/Users/x/go/pkg/mod/github.com/cloudflare/cf-terraforming@v0.20.1-0.20240802023314-3ab7b24cd8ab/cmd/cf-terraforming/main.go:8 +0xf
Confirmation
cf-terraforming version
0.20.0
Expected outcome
Resource generated.
Actual outcome
panik
Steps to reproduce
I dug into the code a little, and seems like terraforming can't cope with
policies.*.reusable
(looking at thiscase
https://github.com/cloudflare/cf-terraforming/blob/v0.20.0/internal/app/cf-terraforming/cmd/util.go#L251), here's an excerpt of API response that I received while running with--verbose
flag:References
No response