github.com/jpreese/tflint@v0.19.2-0.20200908152133-b01686250fb6/docs/rules/terraform_deprecated_interpolation.md (about)

     1  # terraform_deprecated_interpolation
     2  
     3  Disallow deprecated (0.11-style) interpolation
     4  
     5  ## Example
     6  
     7  ```hcl
     8  resource "aws_instance" "deprecated" {
     9      instance_type = "${var.type}"
    10  }
    11  
    12  resource "aws_instance" "new" {
    13      instance_type = var.type
    14  }
    15  ```
    16  
    17  ```
    18  $ tflint
    19  1 issue(s) found:
    20  
    21  Warning: Interpolation-only expressions are deprecated in Terraform v0.12.14 (terraform_deprecated_interpolation)
    22  
    23    on example.tf line 2:
    24     2:     instance_type = "${var.type}"
    25  
    26  Reference: https://github.com/terraform-linters/tflint/blob/v0.14.0/docs/rules/terraform_deprecated_interpolation.md
    27   
    28  ```
    29  
    30  ## Why
    31  
    32  Terraform v0.12 introduces a new interpolation syntax, but continues to support the old 0.11-style interpolation syntax for compatibility.
    33  
    34  Terraform will currently print diagnostic warnings when deprecated interpolations are used. Consistent with its deprecation policy, they will raise errors in the next major release (v0.13). TFLint emits an issue instead of a warning with the same logic.
    35  
    36  ## How To Fix
    37  
    38  Switch to the new interpolation syntax. See the release notes for Terraform 0.12.14 for details: https://github.com/hashicorp/terraform/releases/tag/v0.12.14