Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the official Linode Terraform provider #12

Open
12 tasks
displague opened this issue Dec 18, 2018 · 1 comment
Open
12 tasks

Use the official Linode Terraform provider #12

displague opened this issue Dec 18, 2018 · 1 comment

Comments

@displague
Copy link

displague commented Dec 18, 2018

Use https://github.com/terraform-providers/terraform-provider-linode (docs)

  • Add provider "linode" {} block to linode/*/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 to linode_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 = "..." to authorized_keys = [ "..." ] (string to array)
    • Rename root_password to root_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 to label
    • Rename size to type
    • Change type values (from "Linode 1024" to new keys "g6-standard-1", given in the gist below)
  • 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?

@displague
Copy link
Author

The new provider also makes it possible to provision and use data sources for API tokens, NodeBalancers, Domains, Images, and BlockStorage Volumes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant