terraform-provider-lxd icon indicating copy to clipboard operation
terraform-provider-lxd copied to clipboard

Unable to execute provider in alpine

Open rickardrosen opened this issue 7 years ago • 2 comments

Hi, We use an alpine docker container to get a standardized terraform environment but cannot use this provider. I'm also unable to compile it as there seems to be an integration issue with the current LXD go lib:

../../lxc/lxd/shared/archive_linux.go:79:15: undefined: DeviceTotalMemory
../../lxc/lxd/shared/network_linux.go:20:9: undefined: ExecReaderToChannel

Would it be possible to request release a build with CGO_ENABLED=0?

Thanks!

Rickard

rickardrosen avatar Feb 08 '18 13:02 rickardrosen

Hi @rickardrosen I'm happy to add CGO_ENABLED=0 to the build - have you been able to confirm it fixes your issue? Or are you still unable to build due to the LXD go lib error? Matt

sl1pm4t avatar Feb 12 '18 20:02 sl1pm4t

Last I tried it failed. Haven’t dug into it other than that my own provider for our configdb/inventory required the cgo flag disabled for it to run under alpine.

If you build it I’ll be happy to test the binary.

Regards Rickard

On Mon, 12 Feb 2018 at 21:13, Matt Morrison [email protected] wrote:

Hi @rickardrosen https://github.com/rickardrosen I'm happy to add CGO_ENABLED=0 to the build - have you been able to confirm it fixes your issue? Or are you still unable to build due to the LXD go lib error? Matt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sl1pm4t/terraform-provider-lxd/issues/125#issuecomment-365047461, or mute the thread https://github.com/notifications/unsubscribe-auth/AK5HqOCHwf6749ykEm5J4WpGHqfIZfj5ks5tUJtRgaJpZM4R-ZIo .

rickardrosen avatar Feb 12 '18 20:02 rickardrosen

This was fixed by #205

https://github.com/terraform-lxd/terraform-provider-lxd/blob/ce56b737fd230034b27c9b9aa4bdd09da8298901/.goreleaser.yml#L12

adamcstephens avatar Jun 02 '23 02:06 adamcstephens