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.42k stars 9.51k forks source link

Terraform v0.13.0-beta1 panic on nested modules #25171

Closed brandocorp closed 4 years ago

brandocorp commented 4 years ago

Terraform Version

Terraform v0.13.0-beta1

Terraform Configuration Files

# main.tf
module "shapes" {
  source = "./modules/shapes"

  circle = 5
  square = 5
}

# modules/shapes/main.tf
variable "circle" {}
variable "square" {}

module "circle" {
  source = "../circle"
  radius = var.circle
}

module "square" {
  source = "../square"
  length = var.square
}

output "circle_area" {
  value = module.circle.area
}

output "square_area" {
  value = module.square.area
}

# modules/circle/main.tf
variable "radius" {}

locals {
  pi   = 3.14
  area = local.pi * pow(var.radius, 2)
}

output "area" {
  value = local.area
}

# modules/square/main.tf
variable "length" {}

locals {
  area = pow(var.length, 2)
}

output "area" {
  value = local.area
}

Debug Output

2020/06/07 11:57:45 [INFO] Terraform version: 0.13.0 beta1 
2020/06/07 11:57:45 [INFO] Go runtime version: go1.14.2
2020/06/07 11:57:45 [INFO] CLI args: []string{"/home/brandocorp/bin/terraform", "plan"}
2020/06/07 11:57:45 [DEBUG] Attempting to open CLI config file: /home/brandocorp/.terraformrc
2020/06/07 11:57:45 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /home/brandocorp/.local/share/terraform/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /usr/share/usr/share/xsessions/plasma/terraform/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /home/brandocorp/.local/share/flatpak/exports/share/terraform/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /var/lib/flatpak/exports/share/terraform/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2020/06/07 11:57:45 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2020/06/07 11:57:45 [INFO] CLI command args: []string{"plan"}
2020/06/07 11:57:45 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/06/07 11:57:45 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/06/07 11:57:45 [DEBUG] New state was assigned lineage "689805af-89ef-145b-27e8-972e6c800ae5"
2020/06/07 11:57:45 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2020/06/07 11:57:45 [TRACE] Meta.Backend: instantiated backend of type <nil>
2020/06/07 11:57:45 [DEBUG] checking for provisioner in "."
2020/06/07 11:57:45 [DEBUG] checking for provisioner in "/home/brandocorp/bin"
2020/06/07 11:57:45 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2020/06/07 11:57:45 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2020/06/07 11:57:45 [INFO] backend/local: starting Plan operation
2020/06/07 11:57:45 [TRACE] backend/local: requesting state manager for workspace "default"
2020/06/07 11:57:45 [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/06/07 11:57:45 [TRACE] backend/local: requesting state lock for workspace "default"
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: no previously-stored snapshot exists
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info
2020/06/07 11:57:45 [TRACE] backend/local: reading remote state for workspace "default"
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/06/07 11:57:45 [TRACE] statemgr.Filesystem: read nil snapshot
2020/06/07 11:57:45 [TRACE] backend/local: retrieving local state snapshot for workspace "default"
2020/06/07 11:57:45 [TRACE] backend/local: building context for current working directory
2020/06/07 11:57:45 [TRACE] terraform.NewContext: starting
2020/06/07 11:57:45 [TRACE] terraform.NewContext: loading provider schemas
2020/06/07 11:57:45 [TRACE] terraform.NewContext: complete
2020/06/07 11:57:45 [TRACE] backend/local: finished building terraform.Context
2020/06/07 11:57:45 [TRACE] backend/local: requesting interactive input, if necessary
2020/06/07 11:57:45 [TRACE] Context.Input: Prompting for provider arguments
2020/06/07 11:57:45 [TRACE] backend/local: running validation operation
2020/06/07 11:57:45 [INFO] terraform: building graph: GraphTypeValidate
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ConfigTransformer
2020/06/07 11:57:45 [TRACE] ConfigTransformer: Starting for path: 
2020/06/07 11:57:45 [TRACE] ConfigTransformer: Starting for path: module.shapes
2020/06/07 11:57:45 [TRACE] ConfigTransformer: Starting for path: module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] ConfigTransformer: Starting for path: module.shapes.module.square
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ConfigTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.LocalTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.LocalTransformer with new graph:
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.OutputTransformer
2020/06/07 11:57:45 [TRACE] OutputTransformer: adding area as *terraform.nodeExpandOutput
2020/06/07 11:57:45 [TRACE] OutputTransformer: adding area as *terraform.nodeExpandOutput
2020/06/07 11:57:45 [TRACE] OutputTransformer: adding circle_area as *terraform.nodeExpandOutput
2020/06/07 11:57:45 [TRACE] OutputTransformer: adding square_area as *terraform.nodeExpandOutput
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.OutputTransformer with new graph:
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.StateTransformer
2020/06/07 11:57:45 [TRACE] StateTransformer: state is empty, so nothing to do
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.StateTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.AttachStateTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.RootVariableTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.MissingProvisionerTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.MissingProvisionerTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ProvisionerTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ProvisionerTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer with new graph:
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.graphTransformerMulti
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph:
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  ------
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes)
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer (no changes)
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes)
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ParentProviderTransformer
2020/06/07 11:57:45 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ParentProviderTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.graphTransformerMulti (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: Added module.shapes as *terraform.nodeValidateModule
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes (close) must wait for expansion of module.shapes
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.var.circle (expand) must wait for expansion of module.shapes
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.output.circle_area (expand) must wait for expansion of module.shapes
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.output.square_area (expand) must wait for expansion of module.shapes
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.var.square (expand) must wait for expansion of module.shapes
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: Added module.shapes.module.circle as *terraform.nodeValidateModule
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle (expand) must wait for expansion of module.shapes (expand)
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle.local.pi (expand) must wait for expansion of module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle (close) must wait for expansion of module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle.var.radius (expand) must wait for expansion of module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle.local.area (expand) must wait for expansion of module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] ModuleExpansionTransformer: module.shapes.module.circle.output.area (expand) must wait for expansion of module.shapes.module.circle
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer with new graph:
  module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle (close)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle.local.pi (expand)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle (expand)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle.output.area (expand)" references: [module.shapes.module.circle.local.area (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.output.circle_area (expand)" references: [module.shapes.module.circle.output.area (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.output.square_area (expand)" references: [module.shapes.module.square.output.area (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle.var.radius (expand)" references: [module.shapes.var.circle (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.circle.local.area (expand)" references: [module.shapes.module.circle.local.pi (expand) module.shapes.module.circle.var.radius (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.square.local.area (expand)" references: [module.shapes.module.square.var.length (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.var.circle (expand)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes (close)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.var.square (expand)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes (expand)" references: []
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.square.output.area (expand)" references: [module.shapes.module.square.local.area (expand)]
2020/06/07 11:57:45 [DEBUG] ReferenceTransformer: "module.shapes.module.square.var.length (expand)" references: [module.shapes.var.square (expand)]
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph:
  module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.attachDataResourceDependenciesTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.attachDataResourceDependenciesTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.CountBoundaryTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.CountBoundaryTransformer with new graph:
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.TargetsTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.CloseProviderTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.CloseProviderTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.CloseProvisionerTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.CloseProvisionerTransformer (no changes)
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph:
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (close) - *terraform.nodeCloseModule
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes (expand) - *terraform.nodeValidateModule
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  ------
2020/06/07 11:57:45 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer
2020/06/07 11:57:45 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph:
  meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
    module.shapes (close) - *terraform.nodeCloseModule
  module.shapes (close) - *terraform.nodeCloseModule
    module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
  module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle (close) - *terraform.nodeCloseModule
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.circle.local.pi (expand) - *terraform.nodeExpandLocal
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
  module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.circle.var.radius (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.module.circle (expand) - *terraform.nodeValidateModule
    module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
    module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.local.area (expand) - *terraform.nodeExpandLocal
  module.shapes.module.square.var.length (expand) - *terraform.nodeExpandModuleVariable
    module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
  module.shapes.output.circle_area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.circle.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.output.square_area (expand) - *terraform.nodeExpandOutput
    module.shapes.module.square.output.area (expand) - *terraform.nodeExpandOutput
  module.shapes.var.circle (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  module.shapes.var.square (expand) - *terraform.nodeExpandModuleVariable
    module.shapes (expand) - *terraform.nodeValidateModule
  root - *terraform.nodeCloseModule
    meta.count-boundary (EachMode fixup) - *terraform.NodeCountBoundary
  ------
2020/06/07 11:57:45 [DEBUG] Starting graph walk: walkValidate
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes (expand)": starting visit (*terraform.nodeValidateModule)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes (expand)": evaluating
2020/06/07 11:57:45 [TRACE] [walkValidate] Entering eval tree: module.shapes (expand)
2020/06/07 11:57:45 [TRACE] eval: *terraform.evalValidateModule
2020/06/07 11:57:45 [TRACE] [walkValidate] Exiting eval tree: module.shapes (expand)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes (expand)": visit complete
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.circle (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle (expand)": starting visit (*terraform.nodeValidateModule)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle (expand)": evaluating
2020/06/07 11:57:45 [TRACE] [walkValidate] Entering eval tree: module.shapes.module.circle (expand)
2020/06/07 11:57:45 [TRACE] eval: *terraform.evalValidateModule
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.var.square (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square (expand)": starting visit (*terraform.nodeExpandModuleVariable)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square (expand)": expanding dynamic subgraph
2020/06/07 11:57:45 [TRACE] [walkValidate] Exiting eval tree: module.shapes.module.circle (expand)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square (expand)": entering dynamic subgraph
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle (expand)": visit complete
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.var.circle (expand)"
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.circle.local.pi (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi (expand)": starting visit (*terraform.nodeExpandLocal)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi (expand)": expanding dynamic subgraph
2020/06/07 11:57:45 [TRACE] Expanding local: adding module.shapes.module.circle.local.pi as *terraform.NodeLocal
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi (expand)": entering dynamic subgraph
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.var.square"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square": starting visit (*terraform.nodeModuleVariable)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square": evaluating
2020/06/07 11:57:45 [TRACE] [walkValidate] Entering eval tree: module.shapes.var.square
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalSequence
2020/06/07 11:57:45 [TRACE] eval: terraform.EvalNoop
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalOpFilter
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalModuleCallArgument
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle (expand)": starting visit (*terraform.nodeExpandModuleVariable)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle (expand)": expanding dynamic subgraph
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle (expand)": entering dynamic subgraph
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.var.circle"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle": starting visit (*terraform.nodeModuleVariable)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle": evaluating
2020/06/07 11:57:45 [TRACE] [walkValidate] Entering eval tree: module.shapes.var.circle
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalSequence
2020/06/07 11:57:45 [TRACE] eval: terraform.EvalNoop
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalOpFilter
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalModuleCallArgument
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.circle.local.pi"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi": starting visit (*terraform.NodeLocal)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi": evaluating
2020/06/07 11:57:45 [TRACE] [walkValidate] Entering eval tree: module.shapes.module.circle.local.pi
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalLocal
2020/06/07 11:57:45 [TRACE] [walkValidate] Exiting eval tree: module.shapes.module.circle.local.pi
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi": visit complete
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi (expand)": dynamic subgraph completed successfully
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.local.pi (expand)": visit complete
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalSetModuleCallArguments
2020/06/07 11:57:45 [TRACE] eval: *terraform.evalVariableValidations
2020/06/07 11:57:45 [TRACE] evalVariableValidations: not active for module.shapes.var.circle, so skipping
2020/06/07 11:57:45 [TRACE] [walkValidate] Exiting eval tree: module.shapes.var.circle
2020/06/07 11:57:45 [TRACE] eval: *terraform.EvalSetModuleCallArguments
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle": visit complete
2020/06/07 11:57:45 [TRACE] eval: *terraform.evalVariableValidations
2020/06/07 11:57:45 [TRACE] evalVariableValidations: not active for module.shapes.var.square, so skipping
2020/06/07 11:57:45 [TRACE] [walkValidate] Exiting eval tree: module.shapes.var.square
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle (expand)": dynamic subgraph completed successfully
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square": visit complete
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.circle (expand)": visit complete
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square (expand)": dynamic subgraph completed successfully
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.var.square (expand)": visit complete
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.circle.var.radius (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.var.radius (expand)": starting visit (*terraform.nodeExpandModuleVariable)
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.square.var.length (expand)"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.var.radius (expand)": expanding dynamic subgraph
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.square.var.length (expand)": starting visit (*terraform.nodeExpandModuleVariable)
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.var.radius (expand)": entering dynamic subgraph
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.square.var.length (expand)": expanding dynamic subgraph
2020/06/07 11:57:45 [TRACE] dag/walk: visiting "module.shapes.module.circle.var.radius"
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.square.var.length (expand)": visit complete
2020/06/07 11:57:45 [TRACE] vertex "module.shapes.module.circle.var.radius": starting visit (*terraform.nodeModuleVariable)
panic: no expansion has been registered for module.shapes.module.square

goroutine 87 [running]:
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc0003c3e40, 0xc0004cbbd0, 0x1, 0x1, 0xc00056eb50, 0x1, 0x4, 0xc0005a8068, 0x31, 0x2200000029)
        /home/circleci/project/project/instances/expander.go:267 +0xb72
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc0003c3d00, 0xc0004cbbc0, 0x2, 0x2, 0xc0000a7b50, 0x0, 0x4, 0x7f46c8001989, 0x10, 0xc)
        /home/circleci/project/project/instances/expander.go:279 +0x2c9
github.com/hashicorp/terraform/instances.(*Expander).ExpandModule(0xc0003c3d20, 0xc0004cbbc0, 0x2, 0x2, 0x0, 0x0, 0x0)
        /home/circleci/project/project/instances/expander.go:116 +0x108
github.com/hashicorp/terraform/terraform.(*nodeExpandModuleVariable).DynamicExpand(0xc0002f6380, 0x23ae440, 0xc0002abc70, 0x1, 0x1, 0x1)
        /home/circleci/project/project/terraform/node_module_variable.go:42 +0x94
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x1d18b20, 0xc0002f6380, 0x0, 0x0, 0x0)
        /home/circleci/project/project/terraform/graph.go:84 +0x4d8
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc00039c240, 0x1d18b20, 0xc0002f6380, 0xc0003ab8c0)
        /home/circleci/project/project/dag/walk.go:387 +0x357
created by github.com/hashicorp/terraform/dag.(*Walker).Update
        /home/circleci/project/project/dag/walk.go:309 +0x11d7
panic: no expansion has been registered for module.shapes.module.square

goroutine 87 [running]:
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc0003c3e40, 0xc0004cbbd0, 0x1, 0x1, 0xc00056eb50, 0x1, 0x4, 0xc0005a8068, 0x31, 0x2200000029)
        /home/circleci/project/project/instances/expander.go:267 +0xb72
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc0003c3d00, 0xc0004cbbc0, 0x2, 0x2, 0xc0000a7b50, 0x0, 0x4, 0x7f46c8001989, 0x10, 0xc)
        /home/circleci/project/project/instances/expander.go:279 +0x2c9
github.com/hashicorp/terraform/instances.(*Expander).ExpandModule(0xc0003c3d20, 0xc0004cbbc0, 0x2, 0x2, 0x0, 0x0, 0x0)
        /home/circleci/project/project/instances/expander.go:116 +0x108
github.com/hashicorp/terraform/terraform.(*nodeExpandModuleVariable).DynamicExpand(0xc0002f6380, 0x23ae440, 0xc0002abc70, 0x1, 0x1, 0x1)
        /home/circleci/project/project/terraform/node_module_variable.go:42 +0x94
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x1d18b20, 0xc0002f6380, 0x0, 0x0, 0x0)
        /home/circleci/project/project/terraform/graph.go:84 +0x4d8
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc00039c240, 0x1d18b20, 0xc0002f6380, 0xc0003ab8c0)
        /home/circleci/project/project/dag/walk.go:387 +0x357
created by github.com/hashicorp/terraform/dag.(*Walker).Update
        /home/circleci/project/project/dag/walk.go:309 +0x11d7

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain 
sensitive information that must be redacted before it is safe to share 
on the issue tracker.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Crash Output

https://raw.githubusercontent.com/brandocorp/terraform-13-beta/master/crash-001/crash.log

Expected Behavior

$ terraform version
Terraform v0.12.24

Your version of Terraform is out of date! The latest version
is 0.12.26. You can update by downloading from https://www.terraform.io/downloads.html
$ terraform init    
Initializing modules...
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes...
- shapes in .terraform/modules/shapes/crash-001/modules/shapes
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes.circle...
- shapes.circle in .terraform/modules/shapes.circle/crash-001/modules/circle
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes.square...
- shapes.square in .terraform/modules/shapes.square/crash-001/modules/square

Initializing the backend...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.

Actual Behavior

$ terraform version
Terraform v0.13.0-beta1
$ terraform init   
Initializing modules...
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes...
- shapes in .terraform/modules/shapes/crash-001/modules/shapes
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes.circle...
- shapes.circle in .terraform/modules/shapes.circle/crash-001/modules/circle
Downloading git::https://github.com/brandocorp/terraform-13-beta.git for shapes.square...
- shapes.square in .terraform/modules/shapes.square/crash-001/modules/square

Initializing the backend...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
$ terraform plan   
panic: no expansion has been registered for module.shapes.module.square

goroutine 71 [running]:
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc00040c8c0, 0xc0005fc870, 0x1, 0x1, 0xc0001c4b50, 0x1, 0x4, 0xc000417e78, 0x31, 0x2200000029)
        /home/circleci/project/project/instances/expander.go:267 +0xb72
github.com/hashicorp/terraform/instances.(*expanderModule).moduleInstances(0xc00040c800, 0xc0005fc860, 0x2, 0x2, 0xc000539b50, 0x0, 0x4, 0x7fa064fa153c, 0x80, 0x27)
        /home/circleci/project/project/instances/expander.go:279 +0x2c9
github.com/hashicorp/terraform/instances.(*Expander).ExpandModule(0xc00040c820, 0xc0005fc860, 0x2, 0x2, 0x0, 0x0, 0x0)
        /home/circleci/project/project/instances/expander.go:116 +0x108
github.com/hashicorp/terraform/terraform.(*nodeExpandModuleVariable).DynamicExpand(0xc000514a00, 0x23ae440, 0xc0004160d0, 0x1, 0x1, 0x1)
        /home/circleci/project/project/terraform/node_module_variable.go:42 +0x94
github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x1d18b20, 0xc000514a00, 0x0, 0x0, 0x0)
        /home/circleci/project/project/terraform/graph.go:84 +0x4d8
github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc00021d2c0, 0x1d18b20, 0xc000514a00, 0xc0002d5f80)
        /home/circleci/project/project/dag/walk.go:387 +0x357
created by github.com/hashicorp/terraform/dag.(*Walker).Update
        /home/circleci/project/project/dag/walk.go:309 +0x11d7

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain 
sensitive information that must be redacted before it is safe to share 
on the issue tracker.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Steps to Reproduce

git clone https://github.com/brandocorp/terraform-13-beta
cd terraform-13-beta/crash-001
terraform init
terraform plan

References

Might be duplicate or related to #25114

jbardin commented 4 years ago

Thanks @brandocorp, This is the same panic as #25114

ghost commented 4 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.