Fix "Interpolation-only expressions are deprecated" warning in Terraform
Warning: Interpolation-only expressions are deprecated
on main.tf line 3, in provider "aws":
3: region = "${var.region}"
I also got the above warning, which is due to the changed syntax for declaring variables in terraform. See the example below -:
Old syntax- region = "${var.region}" # you will get Interpolation-only warning
New Synatx- region = var.region # no warning
Check the syntax and correct it using any code editor.
Did you upgrade the code first?
Terraform 0.11 isn't compatible with 0.12, so you have to upgrade it first.
terraform init
terraform 0.12upgrade
If your Terraform code is calling other terraform modules, please make sure you have upgraded these terraform modules to 0.12 as well.