Red-Baron
Red-Baron copied to clipboard
Use the official Linode Terraform provider
Use https://github.com/terraform-providers/terraform-provider-linode (docs)
- [ ] Add
provider "linode" {}
block tolinode/*/main.tf
- [ ] Use Linode APIv4 token in provider block (and define and document this variable) (I assume the old APIv3 API Key (not compatible) was being pulled from the environment in the old plugin, since no variable for this exists)
- [ ] Change
linode_linode
resources tolinode_instance
- [ ] Change
region
values (from int ("6" .. or is it "Newark") to the new string keys ("us-east")) - [ ] Change
image
values (from "Debian 9" to "linode/debian9") - [ ] Remove
kernel
field (it was using the default and is not a valid field in the simple linode_instance workflow (to specify a kernel, disks and configs must be created as struct fields in the linode_instance -- not necessary for RedBaron )) - [ ] Rename
ssh_key = "..."
toauthorized_keys = [ "..." ]
(string to array) - [ ] Rename
root_password
toroot_pass
(or just remove it and the random_string resource attached to it. The terraform provider will generate and throw away a random password.) - [ ] Rename
name
tolabel
- [ ] Rename
size
totype
- [ ] Change
type
values (from "Linode 1024" to new keys "g6-standard-1", given in the gist below)
- [ ] Change
- [ ] Remove the compiled terraform plugin from the repo (
terraform init
will automatically download the plugin from the terraform.io registry)
New ids for images, kernels, instance types, regions: https://gist.github.com/displague/3c1728fdf4ff2bacf6960a9b8c6ea73f
These changes are incompatible with previous Linode terraform deployments (and the community plugin).
Should this work be done as a new cloud provider directory, deprecating the old one?
The new provider also makes it possible to provision and use data sources for API tokens, NodeBalancers, Domains, Images, and BlockStorage Volumes.