News for hackers. Stuff that matters.
Re:Terraform 1.0 by himinlomax on Tuesday June 08, 2021 @09:44AM (#27435121)
The tool is ok, but developing plugins for it shows how inadequate Golang is for the job. There's so much repetition and boilerplate required. I wrote a FreeIPA plugin a few years back, it handled just registering a host and the executable weighed over 100 MB! WTF? Haven't looked at that side of things lately, I wonder if it's different nowadays.
Re:Terraform 1.0 by cube2222 on Tuesday June 08, 2021 @09:49AM (#27435172)
We have a big amount of resources available inside of our Spacelift provider[0] and it weights ~20 MB.

It'll probably mostly depend on the libraries you use.

[0]:https://github.com/spacelift-io/terraform-provider-spacelift...

Re:Terraform 1.0 by StopHammoTime on Tuesday June 08, 2021 @10:27AM (#27435618)
Definitely agree with this, Go is so verbose for the application. When I wrote a provider, I had the same problem. What made it even more worse is that I was connecting into an API that made use of dynamic json generation. So many interfaces and other hacks to get the json documents to parse correctly.
Re:Terraform 1.0 by tornato7 on Tuesday June 08, 2021 @11:04AM (#27436138)
Is it a Go problem or a new-to-Go problem? I haven't written terraform plugins specifically but I have been writing Go for years and never find myself needing to write an excessive amount of boilerplate. There can definitely be some frustrations in dealing with dynamic JSON though. JSON-to-Go converters are your friend.
Re:Terraform 1.0 by himinlomax on Tuesday June 08, 2021 @11:36AM (#27436559)
I was not using anything special, I had implemented my own client for IPA. Te equivalent functionality in Python (ended up using Ansible to do my thing) uses just a few kB ...