-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Terraform Validate Does Not Warn On Interpolation In Lists #26331
Copy link
Copy link
Closed
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issue
Description
Terraform Version
Terraform v0.12.28 and 0.13.3
Terraform Configuration Files
Debug Output
Crash Output
no crash
Expected Behavior
terraform validate should raise a warning for deprecated string interpolation inside lists
Actual Behavior
Running terraform validate against the following does not return a warning when interpolation is used inside a list:
locals {
network = "network"
range = "192.168.0.0/24"
}
provider "google" {
}
resource "google_compute_network" "network" {
name = local.network
auto_create_subnetworks = "false"
}
resource "google_compute_subnetwork" "subnetwork" {
depends_on = [google_compute_network.network]
name = "subnetwork"
network = local.network
ip_cidr_range = local.range
}
resource "google_compute_firewall" "firewall" {
depends_on = [google_compute_network.network]
source_ranges = ["${local.range}"]
name = "firewall"
network = local.network
allow {
protocol = "udp"
}
}But it does if interpolation is used in a lone string:
resource "google_compute_network" "network" {
name = "${local.network}"
auto_create_subnetworks = "false"
}
Steps to Reproduce
terraform initterraform validate
Additional Context
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issue