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.

Leave a Comment