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

Keycloak plugin: panic: interface conversion: interface {} is nil, not []interface {} #1649

Closed
jmiedzinski opened this issue Feb 24, 2023 · 4 comments · May be fixed by #1754
Closed

Keycloak plugin: panic: interface conversion: interface {} is nil, not []interface {} #1649

jmiedzinski opened this issue Feb 24, 2023 · 4 comments · May be fixed by #1754
Labels

Comments

@jmiedzinski
Copy link

I tried to import one of my Keycloak realms. After some initial issues with setting it up I got to this point:

2023/02/24 13:11:33 keycloak importing realm xxx
2023/02/24 13:11:33 keycloak importing... realms
2023/02/24 13:11:57 keycloak done importing realms
2023/02/24 13:11:57 Number of resources for service realms: 451
2023/02/24 13:11:57 Refreshing state... keycloak_openid_client_default_scopes.tfer--openid_client_default_scopes_xxx_impersionation_client
(...snip...)
2023/02/24 13:12:02 Refreshing state... keycloak_openid_client_scope.tfer--openid_client_scope_xxx_web_origins
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
github.com/GoogleCloudPlatform/terraformer/providers/keycloak.(*RealmGenerator).PostConvertHook(0xc001267560)
        /home/runner/work/terraformer/terraformer/providers/keycloak/generator.go:519 +0x38cc
github.com/GoogleCloudPlatform/terraformer/terraformutils.(*ProvidersMapping).CleanupProviders(0xc002421988)
        /home/runner/work/terraformer/terraformer/terraformutils/providers_mapping.go:175 +0xb4
github.com/GoogleCloudPlatform/terraformer/cmd.Import({_, _}, {{0xc0006a7440, 0x1, 0x1}, {0x116e9878, 0x0, 0x0}, {0xc00037d4d0, 0x22}, ...}, ...)
        /home/runner/work/terraformer/terraformer/cmd/import.go:110 +0x332
github.com/GoogleCloudPlatform/terraformer/cmd.newCmdKeycloakImporter.func1(0xc00158e2c0?, {0xa3ec1d8?, 0x3?, 0x3?})
        /home/runner/work/terraformer/terraformer/cmd/provider_cmd_keycloak.go:72 +0x9f5
github.com/spf13/cobra.(*Command).execute(0xc00158e2c0, {0xc001645aa0, 0x3, 0x3})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0010e7600)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/GoogleCloudPlatform/terraformer/cmd.Execute()
        /home/runner/work/terraformer/terraformer/cmd/root.go:36 +0x1e
main.main()
        /home/runner/work/terraformer/terraformer/main.go:39 +0x50

terraformer version: v0.8.22
terraform keycloak provider version: 4.1.0

Any hints on that ?

@jmiedzinski
Copy link
Author

terraformer cmd:

terraformer import keycloak --resources=realms --targets xxx

@radumiron
Copy link

I am using terraformer to get infrastructure from AWS, and getting the same error.
I built terraformer from code, using the instructions from the README.md.

Command:
$./terraformer-aws import aws --path-output="output" --compact=true --resources="*" --regions=eu-west-1

terraformer version: v0.8.22
terraform AWS provider version: 4.55.0

@github-actions
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 Apr 26, 2023
@github-actions
Copy link

github-actions bot commented May 4, 2023

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 May 4, 2023
korneil pushed a commit to korneil/terraformer that referenced this issue Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants