Terraform: tf crash with invalid memory address or nil pointer dereference

Created on 27 Nov 2019  ยท  3Comments  ยท  Source: hashicorp/terraform

TF version : 0.12.16

terraform crashes with:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xd7f86e]

crash.log

bug crash

All 3 comments

I isolated the crashy part in this dynamic tag block

  # propagate common_tags to resources created by this AS group
  dynamic "tag" {
    for_each = var.common_tags
    content {
      key = tag.key
      value = tag.value
      propagate_at_launch = true
    }
  }

var.common_tags is loaded in the module from

variable "common_tags" {
  default = ""
}

and passed to the module from

locals {
  common_tags = {
    "Env" = var.current_env[terraform.workspace]
    "RED1" = "REDACTED"
    "RED2" = "REDACTED"
    "RED3" = "REDACTED"
  }
}

module "k8s" {
  source = "./k8s"
  vpc = "${module.vpc.current_vpc}"
  common_tags = local.common_tags
}

Upgrading to aws provider 2.40 (was previously 2.36 where aws_eks_node_group is not yet supported) solve the crash
furthermore tag is not supported in aws_eks_node_group, so dynamic tag is not working.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings