hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.71k stars 9.55k forks source link

v0.14.2 panic: value is marked, so must be unmarked first #27220

Closed Angry-Potato closed 3 years ago

Angry-Potato commented 3 years ago

Terraform Version

Terraform v0.14.2

Terraform Configuration Files

variable "first" {
  type      = object({prop = string})
  sensitive = true
  default   = {prop = "first"}
}

variable "second" {
  type      = object({prop = string})
  sensitive = true
  default   = {prop = "second"}
}

locals {
  properties     = [var.first, var.second]
  no_crash_local = merge(local.properties...)

  properties_copy = [for i in range(0, length(local.properties)) : local.properties[i]]
  crash_local     = merge(local.properties_copy...)
}

Crash Output

2020/12/09 14:18:58 [INFO] Terraform version: 0.14.2  
2020/12/09 14:18:58 [INFO] Go runtime version: go1.15.2
2020/12/09 14:18:58 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2020/12/09 14:18:58 [DEBUG] Attempting to open CLI config file: /Users/[redacted]/.terraformrc
2020/12/09 14:18:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/12/09 14:18:58 [DEBUG] checking for credentials in "/Users/[redacted]/.terraform.d/plugins"
2020/12/09 14:18:58 [DEBUG] checking for credentials in "/Users/[redacted]/.terraform.d/plugins/darwin_amd64"
2020/12/09 14:18:58 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/12/09 14:18:58 [DEBUG] will search for provider plugins in /Users/[redacted]/.terraform.d/plugins
2020/12/09 14:18:58 [TRACE] getproviders.SearchLocalDirectory: /Users/[redacted]/.terraform.d/plugins is a symlink to /Users/[redacted]/.terraform.d/plugins
2020/12/09 14:18:58 [DEBUG] ignoring non-existing provider search directory /Users/[redacted]/Library/Application Support/io.terraform/plugins
2020/12/09 14:18:58 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/12/09 14:18:58 [INFO] CLI command args: []string{"plan"}
2020/12/09 14:18:58 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/12/09 14:18:58 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/12/09 14:18:58 [DEBUG] New state was assigned lineage "5ec85270-6b10-5d54-24f5-c50a8a0f90d2"
2020/12/09 14:18:58 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/12/09 14:18:58 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/12/09 14:18:58 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2020/12/09 14:18:58 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers
2020/12/09 14:18:58 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/aws v3.20.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/hashicorp/aws/3.20.0/darwin_amd64
2020/12/09 14:18:58 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/local v2.0.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/hashicorp/local/2.0.0/darwin_amd64
2020/12/09 14:18:58 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/local v2.0.0 for linux_amd64 at .terraform/providers/registry.terraform.io/hashicorp/local/2.0.0/linux_amd64
2020/12/09 14:18:58 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/aws/3.20.0/darwin_amd64 as a candidate package for registry.terraform.io/hashicorp/aws 3.20.0
2020/12/09 14:18:58 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/local/2.0.0/darwin_amd64 as a candidate package for registry.terraform.io/hashicorp/local 2.0.0
2020/12/09 14:18:58 [TRACE] providercache.fillMetaCache: ignoring .terraform/providers/registry.terraform.io/hashicorp/local/2.0.0/linux_amd64 because it is for linux_amd64, not darwin_amd64
2020/12/09 14:18:59 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers
2020/12/09 14:18:59 [DEBUG] checking for provisioner in "."
2020/12/09 14:18:59 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/12/09 14:18:59 [DEBUG] checking for provisioner in "/Users/[redacted]/.terraform.d/plugins"
2020/12/09 14:18:59 [DEBUG] checking for provisioner in "/Users/[redacted]/.terraform.d/plugins/darwin_amd64"
2020/12/09 14:18:59 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory
2020/12/09 14:18:59 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/12/09 14:18:59 [INFO] backend/local: starting Plan operation
2020/12/09 14:18:59 [TRACE] backend/local: requesting state manager for workspace "default"
2020/12/09 14:18:59 [TRACE] backend/local: state manager for workspace "default" will:
 - read initial snapshot from terraform.tfstate
 - write new snapshots to terraform.tfstate
 - create any backup at terraform.tfstate.backup
2020/12/09 14:18:59 [TRACE] backend/local: requesting state lock for workspace "default"
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: existing snapshot has lineage "7605d3ec-7fb8-0f8a-1e1b-9f99606ea2f2" serial 1
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info
2020/12/09 14:18:59 [TRACE] backend/local: reading remote state for workspace "default"
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2020/12/09 14:18:59 [TRACE] statemgr.Filesystem: read snapshot with lineage "7605d3ec-7fb8-0f8a-1e1b-9f99606ea2f2" serial 1
2020/12/09 14:18:59 [TRACE] backend/local: retrieving local state snapshot for workspace "default"
2020/12/09 14:18:59 [TRACE] backend/local: building context for current working directory
2020/12/09 14:18:59 [TRACE] terraform.NewContext: starting
2020/12/09 14:18:59 [TRACE] terraform.NewContext: loading provider schemas
2020/12/09 14:18:59 [TRACE] terraform.NewContext: complete
2020/12/09 14:18:59 [TRACE] backend/local: finished building terraform.Context
2020/12/09 14:18:59 [TRACE] backend/local: requesting interactive input, if necessary
2020/12/09 14:18:59 [TRACE] Context.Input: Prompting for provider arguments
2020/12/09 14:18:59 [TRACE] backend/local: running validation operation
2020/12/09 14:18:59 [INFO] terraform: building graph: GraphTypeValidate
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ConfigTransformer
2020/12/09 14:18:59 [TRACE] ConfigTransformer: Starting for path: 
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ConfigTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.RootVariableTransformer with new graph:
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.LocalTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.LocalTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
  local.properties_copy (expand) - *terraform.nodeExpandLocal
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.OutputTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.StateTransformer
2020/12/09 14:18:59 [TRACE] StateTransformer: state is empty, so nothing to do
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.StateTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.MissingProvisionerTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.MissingProvisionerTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ProvisionerTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ProvisionerTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
  local.properties_copy (expand) - *terraform.nodeExpandLocal
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer (no changes)
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2020/12/09 14:18:59 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.graphTransformerMulti (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "var.first" references: []
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "var.second" references: []
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "local.no_crash_local (expand)" references: [local.properties (expand)]
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "local.properties_copy (expand)" references: [local.properties (expand) local.properties (expand)]
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "local.crash_local (expand)" references: [local.properties_copy (expand)]
2020/12/09 14:18:59 [DEBUG] ReferenceTransformer: "local.properties (expand)" references: [var.first var.second]
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  local.properties_copy (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.attachDataResourceDependenciesTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.attachDataResourceDependenciesTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.TargetsTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  local.properties_copy (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    local.crash_local (expand) - *terraform.nodeExpandLocal
    local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.CloseProviderTransformer (no changes)
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  local.properties_copy (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    local.crash_local (expand) - *terraform.nodeExpandLocal
    local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2020/12/09 14:18:59 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  local.crash_local (expand) - *terraform.nodeExpandLocal
    local.properties_copy (expand) - *terraform.nodeExpandLocal
  local.no_crash_local (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  local.properties (expand) - *terraform.nodeExpandLocal
    var.first - *terraform.NodeRootVariable
    var.second - *terraform.NodeRootVariable
  local.properties_copy (expand) - *terraform.nodeExpandLocal
    local.properties (expand) - *terraform.nodeExpandLocal
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    local.crash_local (expand) - *terraform.nodeExpandLocal
    local.no_crash_local (expand) - *terraform.nodeExpandLocal
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  var.first - *terraform.NodeRootVariable
  var.second - *terraform.NodeRootVariable
  ------
2020/12/09 14:18:59 [DEBUG] Starting graph walk: walkValidate
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "var.second"
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "var.first"
2020/12/09 14:18:59 [TRACE] vertex "var.second": starting visit (*terraform.NodeRootVariable)
2020/12/09 14:18:59 [TRACE] vertex "var.first": starting visit (*terraform.NodeRootVariable)
2020/12/09 14:18:59 [TRACE] vertex "var.second": visit complete
2020/12/09 14:18:59 [TRACE] vertex "var.first": visit complete
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.properties (expand)"
2020/12/09 14:18:59 [TRACE] vertex "local.properties (expand)": starting visit (*terraform.nodeExpandLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.properties (expand)": expanding dynamic subgraph
2020/12/09 14:18:59 [TRACE] Expanding local: adding local.properties as *terraform.NodeLocal
2020/12/09 14:18:59 [TRACE] vertex "local.properties (expand)": entering dynamic subgraph
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.properties"
2020/12/09 14:18:59 [TRACE] vertex "local.properties": starting visit (*terraform.NodeLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.properties": visit complete
2020/12/09 14:18:59 [TRACE] vertex "local.properties (expand)": dynamic subgraph completed successfully
2020/12/09 14:18:59 [TRACE] vertex "local.properties (expand)": visit complete
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.no_crash_local (expand)"
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local (expand)": starting visit (*terraform.nodeExpandLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local (expand)": expanding dynamic subgraph
2020/12/09 14:18:59 [TRACE] Expanding local: adding local.no_crash_local as *terraform.NodeLocal
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local (expand)": entering dynamic subgraph
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.no_crash_local"
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local": starting visit (*terraform.NodeLocal)
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.properties_copy (expand)"
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy (expand)": starting visit (*terraform.nodeExpandLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy (expand)": expanding dynamic subgraph
2020/12/09 14:18:59 [TRACE] Expanding local: adding local.properties_copy as *terraform.NodeLocal
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy (expand)": entering dynamic subgraph
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.properties_copy"
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy": starting visit (*terraform.NodeLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local": visit complete
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local (expand)": dynamic subgraph completed successfully
2020/12/09 14:18:59 [TRACE] vertex "local.no_crash_local (expand)": visit complete
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy": visit complete
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy (expand)": dynamic subgraph completed successfully
2020/12/09 14:18:59 [TRACE] vertex "local.properties_copy (expand)": visit complete
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.crash_local (expand)"
2020/12/09 14:18:59 [TRACE] vertex "local.crash_local (expand)": starting visit (*terraform.nodeExpandLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.crash_local (expand)": expanding dynamic subgraph
2020/12/09 14:18:59 [TRACE] Expanding local: adding local.crash_local as *terraform.NodeLocal
2020/12/09 14:18:59 [TRACE] vertex "local.crash_local (expand)": entering dynamic subgraph
2020/12/09 14:18:59 [TRACE] dag/walk: visiting "local.crash_local"
2020/12/09 14:18:59 [TRACE] vertex "local.crash_local": starting visit (*terraform.NodeLocal)
2020/12/09 14:18:59 [TRACE] vertex "local.crash_local": visit complete
panic: value is marked, so must be unmarked first

goroutine 98 [running]:
github.com/zclconf/go-cty/cty.Value.assertUnmarked(...)
    /go/pkg/mod/github.com/zclconf/go-cty@v1.7.0/cty/marks.go:123
github.com/zclconf/go-cty/cty.Value.LengthInt(0x384f040, 0xc0006f6ce0, 0x3145580, 0xc0006f6d20, 0x1)
    /go/pkg/mod/github.com/zclconf/go-cty@v1.7.0/cty/value_ops.go:1025 +0x4f
github.com/hashicorp/hcl/v2/hclsyntax.(*FunctionCallExpr).Value(0xc0005004b0, 0xc0006f7300, 0x0, 0xc000957800, 0x1, 0x1, 0x0, 0x0, 0x0)
    /go/pkg/mod/github.com/hashicorp/hcl/v2@v2.8.0/hclsyntax/expression.go:320 +0x3ba5
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0006f8410, 0x384da40, 0xc0005004b0, 0x384ef00, 0x49372f0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/circleci/project/project/lang/eval.go:171 +0x1b7
github.com/hashicorp/terraform/terraform.(*BuiltinEvalContext).EvaluateExpr(0xc000948270, 0x384da40, 0xc0005004b0, 0x384ef00, 0x49372f0, 0x0, 0x0, 0x0, 0x106d060, 0xc000679a20, ...)
    /home/circleci/project/project/terraform/eval_context_builtin.go:287 +0xbb
github.com/hashicorp/terraform/terraform.(*NodeLocal).Execute(0xc000a894a0, 0x388a660, 0xc000948270, 0xc00003a004, 0x309dce0, 0x3223be0)
    /home/circleci/project/project/terraform/node_local.go:156 +0x71d
github.com/hashicorp/terraform/terraform.(*ContextGraphWalker).Execute(0xc0008bb450, 0x388a660, 0xc000948270, 0x2ce0d9f8, 0xc000a894a0, 0x0, 0x0, 0x0)
    /home/circleci/project/project/terraform/graph_walk_context.go:127 +0xbc
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x3223be0, 0xc000a894a0, 0x0, 0x0, 0x0)
    /home/circleci/project/project/terraform/graph.go:59 +0x962
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc0006f41e0, 0x3223be0, 0xc000a894a0, 0xc000a982c0)
    /home/circleci/project/project/dag/walk.go:387 +0x375
created by github.com/hashicorp/terraform/dag.(*Walker).Update
    /home/circleci/project/project/dag/walk.go:309 +0x1246

Expected Behavior

Command success

Actual Behavior

Panic / terraform crash

Steps to Reproduce

$ terraform init
$ terraform plan

Additional Context

References

seems related to:

https://github.com/hashicorp/terraform/pull/27187

https://github.com/hashicorp/terraform/issues/27107 https://github.com/hashicorp/terraform/issues/27040

danieldreier commented 3 years ago

I've reproduced this on 0.14.0 and 0.14.2 and copied the reproduction case to https://github.com/danieldreier/terraform-issue-reproductions/tree/master/27220 for ease of local reproduction. Thank you for reporting this very clear, simple reproduction case

alisdair commented 3 years ago

Hi @Angry-Potato, thanks for the report. There's a fix in the upstream HCL library which fixes this issue here: https://github.com/hashicorp/hcl/pull/429

nikolay commented 3 years ago

@alisdair It was fixed in the HCL and merged. Any expectations on when to expect this fix as we're kind of stuck because of it?

alisdair commented 3 years ago

We're continuing to work on other bugs and currently intend to release 0.14.3 on Wednesday 16th December.

nikolay commented 3 years ago

@alisdair Is this getting released today? I know there are a lot of other issues with v0.14, but this one does not involve new features like the others, i.e. this should be released, and the v0.14.4 should cover the issues with v0.14-specific features.

nikolay commented 3 years ago

Thank you, @alisdair! 🎉

alisdair commented 3 years ago

Terraform 0.14.3 is now released, which includes the fix for this issue.

nikolay commented 3 years ago

Thank you, @alisdair! Great job! 🚀

woz5999 commented 3 years ago

@alisdair i'm still seeing this in 0.14.3

alisdair commented 3 years ago

@woz5999 I'm sorry to hear that. Please open a new issue with a small Terraform configuration which lets us reproduce the issue you're seeing. Thanks in advance!

swong847 commented 3 years ago

@alisdair I am also seeing this still with 0.14.3

alisdair commented 3 years ago

@swong847 This specific bug is fixed, but there may be other bugs with the same error message. Please check if #27329 or #27333 covers your exact configuration. If not, please file a new issue with a small Terraform configuration which lets us reproduce the issue you're seeing. Thanks in advance!

nikolay commented 3 years ago

@alisdair Any chance to get these fixed today? Not rushing, just so that we can plan. We experience the same panics and possibly we have the revert to v0.13 for the time being as v0.14 is far from stable with all these regressions.

alisdair commented 3 years ago

No, these bugs are not likely to be fixed today. We are not planning on doing any more releases this calendar year, and the next release will be early 2021.

ghost commented 3 years ago

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.