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

terraformer import panic: interface conversion: interface {} is nil, not []interface {} when importing cloudfront resource #1869

Closed
rickythain opened this issue Apr 24, 2024 · 3 comments
Labels

Comments

@rickythain
Copy link

I notice this error was raised previously and seems it has been fixed for ec2_instance resource only.

2024/04/23 00:03:55 WARN: Fail read resource from provider, wait 300ms before retry
2024/04/23 00:03:55 Fail read resource from provider, trying import command
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*CloudFrontGenerator).PostConvertHook(0x14001822000)
	github.com/GoogleCloudPlatform/terraformer/providers/aws/cloud_front.go:112 +0x668
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*AwsFacade).PostConvertHook(0x140039b3228?)
	github.com/GoogleCloudPlatform/terraformer/providers/aws/aws_facade.go:75 +0x28
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*ProvidersMapping).CleanupProviders(0x140039b3548)
	github.com/GoogleCloudPlatform/terraformer/terraformutils/providers_mapping.go:175 +0xa0
github.com/GoogleCloudPlatform/terraformer/cmd.Import({_, _}, {{0x140013f6000, 0x55, 0x80}, {0x14000e919d0, 0x1, 0x1}, {0x16bd871ed, 0x24}, ...}, ...)
	github.com/GoogleCloudPlatform/terraformer/cmd/import.go:110 +0x1f4
github.com/GoogleCloudPlatform/terraformer/cmd.importRegionResources({{0x14000e919e0, 0x1, 0x1}, {0x14000e919d0, 0x1, 0x1}, {0x16bd871ed, 0x24}, {0x10bd056d0, 0x9}, ...}, ...)
	github.com/GoogleCloudPlatform/terraformer/cmd/provider_cmd_aws.go:121 +0x260
github.com/GoogleCloudPlatform/terraformer/cmd.newCmdAwsImporter.func1(0x14001611d00?, {0x10bcf95ed?, 0x4?, 0x10bcf95c5?})
	github.com/GoogleCloudPlatform/terraformer/cmd/provider_cmd_aws.go:58 +0x778
github.com/spf13/cobra.(*Command).execute(0x14000d57600, {0x1400043cbd0, 0x9, 0x9})
	github.com/spf13/cobra@v1.1.1/command.go:850 +0x554
github.com/spf13/cobra.(*Command).ExecuteC(0x14000d56580)
	github.com/spf13/cobra@v1.1.1/command.go:958 +0x310
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.1.1/command.go:895
github.com/GoogleCloudPlatform/terraformer/cmd.Execute()
	github.com/GoogleCloudPlatform/terraformer/cmd/root.go:36 +0x20
main.main()
	github.com/GoogleCloudPlatform/terraformer/main.go:39 +0x50
@kteagueof
Copy link

Also getting this trying to import cloudflare records.

panic: interface conversion: interface {} is []interface {}, not map[string]interface {}

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/cloudflare.(*DNSGenerator).PostConvertHook(0x14001d22240)
	github.com/GoogleCloudPlatform/terraformer/providers/cloudflare/dns.go:118 +0x220
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*ProvidersMapping).CleanupProviders(0x14002037a08)
	github.com/GoogleCloudPlatform/terraformer/terraformutils/providers_mapping.go:175 +0xa0
github.com/GoogleCloudPlatform/terraformer/cmd.Import({_, _}, {{0x14000379bc0, 0x1, 0x1}, {0x1142f7300, 0x0, 0x0}, {0x10a8963e0, 0x1e}, ...}, ...)
	github.com/GoogleCloudPlatform/terraformer/cmd/import.go:110 +0x1f4
github.com/GoogleCloudPlatform/terraformer/cmd.newCmdCloudflareImporter.func1(0x14001225a00?, {0x10a7e95ed?, 0x4?, 0x10a7e95c5?})
	github.com/GoogleCloudPlatform/terraformer/cmd/provider_cmd_cloudflare.go:30 +0x80
github.com/spf13/cobra.(*Command).execute(0x14000d21340, {0x14000379800, 0x1, 0x1})
	github.com/spf13/cobra@v1.1.1/command.go:850 +0x554
github.com/spf13/cobra.(*Command).ExecuteC(0x14000636580)
	github.com/spf13/cobra@v1.1.1/command.go:958 +0x310
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.1.1/command.go:895
github.com/GoogleCloudPlatform/terraformer/cmd.Execute()
	github.com/GoogleCloudPlatform/terraformer/cmd/root.go:36 +0x20
main.main()
	github.com/GoogleCloudPlatform/terraformer/main.go:39 +0x50

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 14, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants