-
Notifications
You must be signed in to change notification settings - Fork 129
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
cloudflare_logpush_job import not working/ generate works fine #381
Comments
this autogenerated name when it was created is causing some issues resource "cloudflare_logpush_job" "terraform_managed_resource_20064.000000" { } |
Hello, The import fails because the ID of LogpushJob is not a string (cf-terraformin uses cloudflare-go): type LogpushJob struct {
ID int `json:"id,omitempty"`
.../...
} With cf-terraforming the id is seen as a float64, adding Import is expecting a string so this line fails:
Generate has been "badly fixed" : #248 "Badly" because generate should not use a
If you try (as indicated here : ) :
it fails with
If you remove the
it also fails
So the ID should be converted as a string, the resource name should be |
BTW according to the documentation import of Line 184 in edb8506
cf-terraforming/internal/app/cf-terraforming/cmd/import.go Lines 18 to 43 in 8e21fee
There is no mapping for cf-terraforming/internal/app/cf-terraforming/cmd/import.go Lines 297 to 300 in 8e21fee
|
Confirmation
cf-terraforming version
0.6.3
Expected outcome
should import my state
Actual outcome
panic: interface conversion: interface {} is float64, not string
goroutine 1 [running]:
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.runImport.func1(0x1687720, {0xdf4078, 0x6, 0x6})
/home/runner/work/cf-terraforming/cf-terraforming/internal/app/cf-terraforming/cmd/import.go:264 +0x1c7f
github.com/spf13/cobra.(*Command).execute(0x1687720, {0xc000306a80, 0x6, 0x6})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x16879a0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/cloudflare/cf-terraforming/internal/app/cf-terraforming/cmd.Execute()
/home/runner/work/cf-terraforming/cf-terraforming/internal/app/cf-terraforming/cmd/root.go:30 +0x25
main.main()
/home/runner/work/cf-terraforming/cf-terraforming/cmd/cf-terraforming/main.go:8 +0x17
Steps to reproduce
cf-terraforming import -z $zoneid -t $token --resource-type "cloudflare_logpush_job"
References
no
The text was updated successfully, but these errors were encountered: