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

Problem with name of resource with only provider name #396

Open
littlejo opened this issue Apr 30, 2024 · 0 comments
Open

Problem with name of resource with only provider name #396

littlejo opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@littlejo
Copy link

What happened?

I'm trying to create crossplane provider using upjet for my provider: https://github.com/littlejo/terraform-provider-cilium
I tried to export two resources: cilium and cilium_hubble
But i can't export cilium:

17:22:32 [ .. ] go generate linux_amd64
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
[github.com/crossplane/upjet/pkg/config.DefaultResource({0xc000012eb8](http://github.com/crossplane/upjet/pkg/config.DefaultResource(%7B0xc000012eb8), 0x6}, 0xc0001feee0, 0xc0001e4bd0, {0xc00042c028, 0x1, 0x100f8fe?})
	/Users/joseph.ligier/go/pkg/mod/github.com/crossplane/[email protected]/pkg/config/common.go:66 +0x3cc
[github.com/crossplane/upjet/pkg/config.NewProvider({0xc0002a6000](http://github.com/crossplane/upjet/pkg/config.NewProvider(%7B0xc0002a6000)?, 0xc0005561e0?, 0xc00039fd78?}, {0x2503fc0, 0x6}, {0x2530837, 0x23}, {0xc0002a8000, 0x1bb8, 0x2000}, ...)
	/Users/joseph.ligier/go/pkg/mod/github.com/crossplane/[email protected]/pkg/config/provider.go:253 +0x76e
[github.com/littlejo/provider-cilium/config.GetProvider()](http://github.com/littlejo/provider-cilium/config.GetProvider())
	/Users/joseph.ligier/clients/perso/crossplane/provider-cilium/config/provider.go:29 +0x365
main.main()
	/Users/joseph.ligier/clients/perso/crossplane/provider-cilium/cmd/generator/main.go:26 +0x65
exit status 2
apis/generate.go:25: running “go”: exit status 1
17:23:35 [FAIL]
make[1]: *** [go.generate] Error 1
make: *** [generate] Error 2

How can we reproduce it?

Github: repo is https://github.com/littlejo/provider-cilium
Branch: cilium-resource
make generate

@littlejo littlejo added the bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant