faasd icon indicating copy to clipboard operation
faasd copied to clipboard

Migration of terraform from 0.12 to 0.14 documented

Open Lewiscowles1986 opened this issue 5 years ago • 2 comments

Currently the DigitalOcean OpenFaaS terraform only works with 0.12.

0.13 and 0.14 are possible without operator expertise, if a specific set of commands is run, in specific situations.

While terraform administrators may know to run these commands; what to run. People coming in from blogs may not be professional administrators and are likely to make noise in Github, twitter, etc.

Expected Behavior

terraform init either works without error (warnings okay I guess), or gives an error directing to upgrade terraform versions.

Current Behavior

terraform init can give errors in newer terraform versions on greenfield and brownfield deploys.

Possible Solution

Link external documentation

Document the migration from 0.12 upwards as a note or aside on articles referencing the affected terraform files. Currently only digitalocean openfaas one is known about. Terraform actually handles most of this for you, but people need to know where to look and how to approach.

  • https://www.terraform.io/upgrade-guides/0-13.html
  • https://www.terraform.io/upgrade-guides/0-14.html

Linking to these drastically cuts down work and improves signposting.

Be more explicit about the current terraform version

Dockerfile, Vagrantfile, or big section "this is / could be old" could very much handle this.

  • Current does contain a note that people should only use terraform 0.12
  • From 20th December
  • locking people to old releases can be done in more obvious ways
    • link to https://releases.hashicorp.com/terraform/ so people don't need to find or know to look for 0.12 download link OR
    • provide a link to a locally hosted terraform file

limitations

Both of these approaches only work going forwards. Neither fully meets the desired state of all error messages signposting, which is unfortunate.

Steps to Reproduce (for bugs)

Follow this guide using 0.14, which is the version from the large icons on the terraform download page, no matter your OS.

  • https://web.archive.org/web/20201220211137/https://www.openfaas.com/blog/faasd-tls-terraform/
  • at the terraform init stage 0.14 will not direct to upgrade, like 0.13 would

Context

To be honest this does not affect me. I know what I'm doing, but I've not always known, and have only been able to know due to good documentation practices and mentoring. It's hard.

Your Environment

N/A (it's the same across OSx, Windows and Linux, I've reproduced on all three.

Lewiscowles1986 avatar Dec 23 '20 13:12 Lewiscowles1986

Just to say - I hit this issue whilst following Alex's book yesterday. I worked around it as I use https://github.com/tfutils/tfenv to manage multiple terraform versions.

iwootten avatar Jan 21 '21 17:01 iwootten

@Waterdrips could you take over this and move us up to 0.15.0?

When done, let me know so I can update existing tutorials and resources.

alexellis avatar Apr 28 '21 15:04 alexellis