Terraform upgrade to latest

Hi,

We are using terraform 0.12.24. The terraform provider we are using is Datadog.
Any steps to upgrade to the latest would be helpful.

Hello aujjwal-smarsh,

Please be more detailed. Do you want to update terraform to the latest version ? DataDog provider to the latest version for terraform 0.12.24 ? Or both of them?

Currently the latest version of terraform is 1.1.7 and to go for it you should follow the upgrade steps. You cannot jump directly to the latest version this could lead to errors. Also you need to run apply after every terraform version upgrade.

You can find the documentation for each version of datadog provider here

Have in mind that the syntax for the latest versions may be different from the current which you are using.

Best Regards,
Kiril Krastev

Thanks a lot Kiril.
I want to upgrade the datadog provider as well. But I can’t understand how to do so because I don’t know where it is specified.

In my tf file it is only this much

provider "datadog" {}
terraform {
  required_version = ">= 0.12.24"
  backend "s3" {
...
  }
}

Hello aujjwal-smarsh,

You can check the current version for your datadog provider in the .terraform.lock.hcl file.
You can also run $ terraform version command in your working folder and it will display which providers where initialized and downloaded after $ terraform init. It will display the current tf version you are using.

Best Regards,
Kiril