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.76k stars 9.56k forks source link

Terraform crash on running 'terraform get' on local modules #4212

Closed gwarburton74 closed 8 years ago

gwarburton74 commented 8 years ago

2015/12/08 09:48:53 [INFO] Terraform version: 0.6.8 f1f214f03df27c1a790980b6f050fe92a7a547bf 2015/12/08 09:48:53 [DEBUG] Detected home directory from env var: /home/gwarburton 2015/12/08 09:48:53 [DEBUG] Discovered plugin: atlas = /home/gwarburton/bin/terraform-provider-atlas 2015/12/08 09:48:53 [DEBUG] Discovered plugin: aws = /home/gwarburton/bin/terraform-provider-aws 2015/12/08 09:48:53 [DEBUG] Discovered plugin: azure = /home/gwarburton/bin/terraform-provider-azure 2015/12/08 09:48:53 [DEBUG] Discovered plugin: cloudflare = /home/gwarburton/bin/terraform-provider-cloudflare 2015/12/08 09:48:53 [DEBUG] Discovered plugin: cloudstack = /home/gwarburton/bin/terraform-provider-cloudstack 2015/12/08 09:48:53 [DEBUG] Discovered plugin: consul = /home/gwarburton/bin/terraform-provider-consul 2015/12/08 09:48:53 [DEBUG] Discovered plugin: digitalocean = /home/gwarburton/bin/terraform-provider-digitalocean 2015/12/08 09:48:53 [DEBUG] Discovered plugin: dme = /home/gwarburton/bin/terraform-provider-dme 2015/12/08 09:48:53 [DEBUG] Discovered plugin: dnsimple = /home/gwarburton/bin/terraform-provider-dnsimple 2015/12/08 09:48:53 [DEBUG] Discovered plugin: docker = /home/gwarburton/bin/terraform-provider-docker 2015/12/08 09:48:53 [DEBUG] Discovered plugin: dyn = /home/gwarburton/bin/terraform-provider-dyn 2015/12/08 09:48:53 [DEBUG] Discovered plugin: google = /home/gwarburton/bin/terraform-provider-google 2015/12/08 09:48:53 [DEBUG] Discovered plugin: heroku = /home/gwarburton/bin/terraform-provider-heroku 2015/12/08 09:48:53 [DEBUG] Discovered plugin: mailgun = /home/gwarburton/bin/terraform-provider-mailgun 2015/12/08 09:48:53 [DEBUG] Discovered plugin: null = /home/gwarburton/bin/terraform-provider-null 2015/12/08 09:48:53 [DEBUG] Discovered plugin: openstack = /home/gwarburton/bin/terraform-provider-openstack 2015/12/08 09:48:53 [DEBUG] Discovered plugin: packet = /home/gwarburton/bin/terraform-provider-packet 2015/12/08 09:48:53 [DEBUG] Discovered plugin: rundeck = /home/gwarburton/bin/terraform-provider-rundeck 2015/12/08 09:48:53 [DEBUG] Discovered plugin: statuscake = /home/gwarburton/bin/terraform-provider-statuscake 2015/12/08 09:48:53 [DEBUG] Discovered plugin: template = /home/gwarburton/bin/terraform-provider-template 2015/12/08 09:48:53 [DEBUG] Discovered plugin: terraform = /home/gwarburton/bin/terraform-provider-terraform 2015/12/08 09:48:53 [DEBUG] Discovered plugin: tls = /home/gwarburton/bin/terraform-provider-tls 2015/12/08 09:48:53 [DEBUG] Discovered plugin: vsphere = /home/gwarburton/bin/terraform-provider-vsphere 2015/12/08 09:48:53 [DEBUG] Discovered plugin: chef = /home/gwarburton/bin/terraform-provisioner-chef 2015/12/08 09:48:53 [DEBUG] Discovered plugin: file = /home/gwarburton/bin/terraform-provisioner-file 2015/12/08 09:48:53 [DEBUG] Discovered plugin: local-exec = /home/gwarburton/bin/terraform-provisioner-local-exec 2015/12/08 09:48:53 [DEBUG] Discovered plugin: remote-exec = /home/gwarburton/bin/terraform-provisioner-remote-exec 2015/12/08 09:48:53 [DEBUG] Detected home directory from env var: /home/gwarburton 2015/12/08 09:48:53 [DEBUG] Attempting to open CLI config file: /home/gwarburton/.terraformrc 2015/12/08 09:48:53 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2015/12/08 09:48:53 [DEBUG] Detected home directory from env var: /home/gwarburton 2015/12/08 09:48:53 [DEBUG] waiting for all plugin processes to complete... panic: runtime error: index out of range

goroutine 1 [running]: github.com/hashicorp/hcl/hcl/parser.(_Parser).objectItem(0xc82011f168, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/hcl/hcl/parser/parser.go:154 +0x423 github.com/hashicorp/hcl/hcl/parser.(_Parser).objectList(0xc82011f168, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/hcl/hcl/parser/parser.go:69 +0xc1 github.com/hashicorp/hcl/hcl/parser.(_Parser).Parse(0xc82011f168, 0xc8201928f0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/hcl/hcl/parser/parser.go:52 +0x100 github.com/hashicorp/hcl/hcl/parser.Parse(0xc8201c2480, 0x232, 0x240, 0xc8201c2480, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/hcl/hcl/parser/parser.go:39 +0x185 github.com/hashicorp/hcl.Parse(0xc8201c2240, 0x232, 0x232, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/hcl/parse.go:17 +0x89 github.com/hashicorp/terraform/config.loadFileHcl(0xc82019ef00, 0x48, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/terraform/config/loader_hcl.go:155 +0x2d6 github.com/hashicorp/terraform/config.loadTree(0xc82019ef00, 0x48, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/terraform/config/import_tree.go:47 +0x313 github.com/hashicorp/terraform/config.LoadFile(0xc82019ef00, 0x48, 0xc8201c40b0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/terraform/config/loader.go:39 +0x3b github.com/hashicorp/terraform/config.LoadDir(0x7ffd10a7a0ac, 0x3c, 0x10, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/terraform/config/loader.go:91 +0x38c github.com/hashicorp/terraform/config/module.NewTreeModule(0x0, 0x0, 0x7ffd10a7a0ac, 0x3c, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hashicorp/terraform/config/module/tree.go:40 +0x41 github.com/hashicorp/terraform/command.(_Meta).Context(0xc8201aa0f0, 0x7ffd10a7a0ac, 0x3c, 0x0, 0x0, 0x1, 0x0, 0x1, 0xc, 0x0, ...) /opt/gopath/src/github.com/hashicorp/terraform/command/meta.go:148 +0x509 github.com/hashicorp/terraform/command.(_GetCommand).Run(0xc8201aa0f0, 0xc82000a2f0, 0x1, 0x1, 0xc8201ac098) /opt/gopath/src/github.com/hashicorp/terraform/command/get.go:54 +0x3ae github.com/mitchellh/cli.(_CLI).Run(0xc8201c4000, 0xc820191320, 0x0, 0x0) /opt/gopath/src/github.com/mitchellh/cli/cli.go:112 +0x655 main.wrappedMain(0x0) /opt/gopath/src/github.com/hashicorp/terraform/main.go:146 +0xb08 main.realMain(0x0) /opt/gopath/src/github.com/hashicorp/terraform/main.go:82 +0xa88 main.main() /opt/gopath/src/github.com/hashicorp/terraform/main.go:18 +0x18

goroutine 5 [syscall]: os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:22 +0x18 created by os/signal.init.1 /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

gwarburton74 commented 8 years ago

Noob mistake on my part. I had variables declared in the module section of my main file and in the module variables file that had not also been declared in the main variables file.

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.