I built a Terraform provider for Balena this weekend. Right now it’s in pre-release, mainly waiting for full test coverage, but for me it solves the major hassle of working with Balena, namely that I cannot provision env variables on devices from inside IaC.
If you want to check it out, you can see it on my Github
Nice! We’ve been using our own implementation of a TF provider for a few years that is wrapped for use in Pulumi.
The most annoying bits of it has been to reverse engineer the undocumented release workflow. When creating a new fleet it requires the presence of a release before we can start deploying to it, so we create an empty dummy release to start when provisioning the fleet, then use our tooling (without Balena CLI) to push releases on every commit.
Would be great if the API would actually document this stuff. Creating a release, getting the Docker image locations on Balena, getting credentials to push locally built images, pushing built images, finalizing the release etc.