Skip to content

External references from destroy provisioners are deprecated #405

@s1mark

Description

@s1mark

module version - v6.2.0
terraform version - 0.12.19 (also affected version 0.12.18)

Warning: External references from destroy provisioners are deprecated on .terraform/modules/gke/modules/beta-private-cluster/cluster.tf line 365, in resource "null_resource" "wait_for_cluster": 365: command = "${path.module}/scripts/wait-for-cluster.sh ${var.project_id} ${var.name}" Destroy-time provisioners and their connection configurations may only reference attributes of the related resource, via 'self', 'count.index', or 'each.key'. References to other resources during the destroy phase can cause dependency cycles and interact poorly with create_before_destroy. (and 2 more similar warnings elsewhere) 

provisioner "local-exec" {
when = destroy
command = "${path.module}/scripts/wait-for-cluster.sh ${var.project_id} ${var.name}"
}

Probably other sub-modules also affected

Discussion thread at HashiCorp:
hashicorp/terraform#23679

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions