Wanting to provision Linodes via Terraform's CDK
I’m wanting to automate the provisioning of infrastructure on Linodes, but I’m having an issue using Terraform’s CDK in Python. This want is motivated by helping computational-science researchers (see below).
I'm wondering if Linode (or anyone else) has any code examples that can spin up servers using Terraform via a programming language (doesn't have to be Python)?
I’m doing this for free on my own time/money as our country (Australia) doesn’t fund science to the level as other OECD countries do, instead it uses taxpayer money to pay it’s rich mates in mining. So I plan to enable researchers to utilise cloud providers like Linode to do computational research at a fraction of the cost of using AWS and the like.
Thanks for helping science!
1 Reply
First, I just want to say that I think it's great of you to do such a service for the Australian scientific community! We could really do with more folks like you, using their hobby-projects and personal interests to directly benefit others.
Having done some digging, I think I was able to find some resources that should get you pointed in the right direction. Disclaimer, I'm not an expert when it comes to using Terraform.
The Terraform Registry hosts the Linode Provider which makes use of our API to deploy and interact with Linode instances.
We have a guide that details How to use Terraform to Provision Linode Environments. While using programming code or the API/Linode-CLI, you will need to make use of our Cloud Manager API Tokens.
Finally, I was able to find some code examples hosted on HashiCorp/Terraform for Python, Java, C Sharp, and Go.
Please note that I haven't tried any of these files myself. While each example files written/named for AWS should be usable on a Linode instance with the required specs, that's not something I can guarantee.
I hope you find these resources as a great starting point, good luck with your coding. We'd love to hear back once you're able to get your project working!