ajfisher/ajfisher.me

Upgrade terraform

Closed this issue · 0 comments

Upgrade all of the infrastructure to use newer terraform options

To go to v0.12 need to do the following:

  • Ensure application is initialised
  • Ensure latest terraform is applied
  • Upgrade the AWS provider to latest version for tf 0.11 v2.70 (v3+ after tf 0.12+)
    • Apply changes
  • Run terraform 0.12checklist
    • Resolve any 0.12checklist items.
    • Apply terraform changes
  • Switch to 0.12
  • Run terraform init
    • resolve any issues
  • run terraform 0.12upgrade
    • Resolve tf upgrade to dos
  • terraform plan to see if there’s any changes and resolve back out to ensure no change.

Upgrade to v0.13 need to do the following:

  • Ensure application is initialised
  • Ensure latest terraform is applied
  • Switch to 0.13
  • Run terraform init
    • resolve any issues
  • run terraform 0.13upgrade
  • run terraform 0.13upgrade on submodule
  • Fix upgrade issue with index changes on resource
  • run terraform apply to update the state

Add version constraint to provider:

  • -/aws: version = "~> 3.63.0"

Upgrade to v0.14 need to do the following:

  • Ensure application is initialised
  • Ensure latest terraform is applied
  • Switch to 0.14
  • Run terraform init
    • Resolve any issues
  • Check in lockfile for versions
  • Apply state change using terraform apply

Upgrade to v0.15 need to do the following:

  • Ensure application is initialised
  • Ensure latest terraform is applied
  • Fix issues with provider inheritance

Upgrade to 1.0.9 need to do the following:

  • Nothing explicit as v0.15 is continuation
  • Update versions file to use 1.0.9 as base