Skip to content

Terraform Validate does not throw warnings for deprecated syntax inside modules #25430

@Jimmyscene

Description

@Jimmyscene

Terraform Version

Tested on multiple 0.12 versions, current version is 0.12.23

Terraform Configuration Files

I would expect the following foo = "${var.hello}" to throw a deprecation warning, but none is shown
Repository created here https://github.com/Jimmyscene/terraform_bug

module "foo" {
  source = "../foo"
  foo    = "${var.hello}" # THIS DOES NOT ERROR?
}

Debug Output

https://gist.github.com/Jimmyscene/41408d647e1d31955d09774de5e7a0af

Expected Behavior

Warning: Interpolation-only expressions are deprecated

  on ../bar/main.tf line 6, in provider "null":
   7:  foo    = "${var.hello}" # THIS DOES NOT ERROR?

  on ../foo/main.tf line 6, in provider "null":
   6:   acceptable = "${var.foo}" # WARNING: Interpolation-only expressions are deprecated

Actual Behavior

Warning: Interpolation-only expressions are deprecated

  on ../foo/main.tf line 6, in provider "null":
   6:   acceptable = "${var.foo}" # WARNING: Interpolation-only expressions are deprecated

Steps to Reproduce

  1. Clone down repository linked above
  2. cd bar
  3. terraform init
  4. terraform validate

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfigconfirmeda Terraform Core team member has reproduced this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions