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

Error when importing resource identitystore #1864

Open
jingjia-peng opened this issue Apr 13, 2024 · 2 comments
Open

Error when importing resource identitystore #1864

jingjia-peng opened this issue Apr 13, 2024 · 2 comments

Comments

@jingjia-peng
Copy link

I encounter this error when I'm calling terraformer import aws -c -r *, and when it comes to the check of identitystore this error occur:

2024/04/13 12:23:26 aws importing... identitystore
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*IdentityStoreGenerator).GetIdentityStoreId(0xc0016750d0?)
        /Users/sergey/temp/terraformer/providers/aws/identitystore.go:44 +0x1ce
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*IdentityStoreGenerator).InitResources(0x0?)
        /Users/sergey/temp/terraformer/providers/aws/identitystore.go:169 +0x25
github.com/GoogleCloudPlatform/terraformer/providers/aws.(*AwsFacade).InitResources(0xc000da0af0?)
        /Users/sergey/temp/terraformer/providers/aws/aws_facade.go:61 +0x26
github.com/GoogleCloudPlatform/terraformer/cmd.initServiceResources({_, _}, {_, _}, {{0xc00156c800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:209 +0x21e
github.com/GoogleCloudPlatform/terraformer/cmd.initAllServicesResources(_, {{0xc00156c800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, {0xb15cdd8, ...}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:166 +0x1c5
github.com/GoogleCloudPlatform/terraformer/cmd.Import({_, _}, {{0xc00156c800, 0x56, 0x80}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/import.go:98 +0x2a5
github.com/GoogleCloudPlatform/terraformer/cmd.importRegionResources({{0xc000baf830, 0x1, 0x1}, {0x12999268, 0x0, 0x0}, {0xb20575b, 0x1e}, {0xb15cdd8, 0x9}, ...}, ...)
        /Users/sergey/temp/terraformer/cmd/provider_cmd_aws.go:121 +0x292
github.com/GoogleCloudPlatform/terraformer/cmd.newCmdAwsImporter.func1(0xc001362580?, {0xb14e4f4?, 0x3?, 0x3?})
        /Users/sergey/temp/terraformer/cmd/provider_cmd_aws.go:66 +0x11e
github.com/spf13/cobra.(*Command).execute(0xc001362580, {0xc001550540, 0x3, 0x3})
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000e51340)
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/sergey/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/GoogleCloudPlatform/terraformer/cmd.Execute()
        /Users/sergey/temp/terraformer/cmd/root.go:36 +0x1e
main.main()
        /Users/sergey/temp/terraformer/main.go:39 +0x50

Actually I don't have this resource on my aws, but it seems that terraformer fails on this case. BTW when I exclude identitystore the command goes well. Is this a bug or my fault?

@nkoustov
Copy link

nkoustov commented Apr 15, 2024

I had the same issue with the officially released version (0.8.24). The version I built from the source code does not have this issue.

@jeffrey-aguilera
Copy link

Dup of #1832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants