Skip to content

interpolation syntax in cloud-dns #1143

@yugandhar-btc

Description

@yugandhar-btc

when we ran the terraform init, it is Warning with Interpolation-only expressions are deprecated .

reference path:-
dns_zones
gke_clusters

Observed behavior

Warning: Interpolation-only expressions are deprecated

on main.tf line 165, in module "example_dev":
165: records = ["${google_compute_global_address.ingress_static_ip.address}"]

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Terraform Configuration

module "example_qa" {
  source  = "terraform-google-modules/cloud-dns/google"
  version = "~> 3.0.0"

  name       = "example-qa"
  project_id = module.project.project_id
  domain     = "example-qa.example.com."
  type       = "public"

  recordsets = [
    {
      name    = "XXXXXXX"
      records = ["${google_compute_global_address.ingress_static_ip.address}"]
      ttl     = 30
      type    = "A"
    },
    {
      name    = "XXXXXXX"
      records = ["${google_compute_global_address.ingress_static_ip.address}"]
      ttl     = 30
      type    = "A"
    },
  ]

}

Terraform Version

Terraform v0.14.0

Additional information

#182

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions