/ devops

Announcing terraform-provider-linode

Iʼve been interested in HashiCorpʼs terraform ever since it was announced. I loved the idea of being able to tie multiple providers together. You could use Route 53 for DNS and Digital Ocean for your servers or you could use DNS Simple with ec2. I havenʼt been able to try it because I use Linode for both my personal servers and at work. Unfortunately, Linode isnʼt one of the included plugins in Terraform and no one had created a plugin for it. So I did what any developer with a bit of free time and a possibly unhealthy obsession with automation tools and HashiCorp products: I built one.

In its current state, itʼs fairly light on features. It only supports managing Linodes (what Linode calls their servers) and not any of the other things that Linode provides. Iʼm hoping to get Linodeʼs DNS and NodeBalancer services added in the future. terraform-provider-linode also doesn't support all of the options that Linode provides. In particular, I intentionally omitted all of the various alerting setting that Linode provides. While adding all of them would have been easy, the sheer number of options seemed too complex for the initial release. The currently implemented features are exactly the features that I needed in order to start using terraform. If you would like to have a particular feature, it would be great if you were able to contribute it to the project. If not, please create an issue on GitHub and Iʼll see when I can get it implemented.

Terraformʼs helper/schema made developing this plugin a breeze. I expected that it would take considerably longer and be more difficult to build terraform-provider-linode. As they mention on the provider plugin page, its really just a matter of setting up CRUD functions for a particular resource. That is all that there is to it. Terraform also includes some extremely handy functions for building acceptance tests. Terraform feels incredibly polished, I find this particularly remarkable as Terraform was only released a little under a year ago. I also found Toahʼs Linode api client library to be extremely helpful for developing this plugin. Linode, unfortunately, hasnʼt created an official Go api client but, Toah really stepped up to make one.

Please check out terraform-provider-linode if it is something that would be useful to you. If youʼd like to contribute, then I would really appriciate your help.