Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform for Digital Ocean crashes: panic: Unary - is only allowed #710

Open
jvdland opened this issue May 26, 2016 · 3 comments
Open

Terraform for Digital Ocean crashes: panic: Unary - is only allowed #710

jvdland opened this issue May 26, 2016 · 3 comments

Comments

@jvdland
Copy link

jvdland commented May 26, 2016

Hi,

When trying to setup Apollo on digitalocean terraform crashes. Might be related to hashicorp/terraform#6432 ?

Thanks,
Joost

Crashlog:
`2016/05/26 10:23:15 [INFO] Terraform version: 0.6.16 6e586c89394f5474b6c5f3217a4a75ce80c3fd6c
2016/05/26 10:23:15 [DEBUG] Detected home directory from env var: /root
2016/05/26 10:23:15 [DEBUG] Discovered plugin: atlas = /opt/terraform/terraform-provider-atlas
2016/05/26 10:23:15 [DEBUG] Discovered plugin: aws = /opt/terraform/terraform-provider-aws
2016/05/26 10:23:15 [DEBUG] Discovered plugin: azure = /opt/terraform/terraform-provider-azure
2016/05/26 10:23:15 [DEBUG] Discovered plugin: azurerm = /opt/terraform/terraform-provider-azurerm
2016/05/26 10:23:15 [DEBUG] Discovered plugin: chef = /opt/terraform/terraform-provider-chef
2016/05/26 10:23:15 [DEBUG] Discovered plugin: clc = /opt/terraform/terraform-provider-clc
2016/05/26 10:23:15 [DEBUG] Discovered plugin: cloudflare = /opt/terraform/terraform-provider-cloudflare
2016/05/26 10:23:15 [DEBUG] Discovered plugin: cloudstack = /opt/terraform/terraform-provider-cloudstack
2016/05/26 10:23:15 [DEBUG] Discovered plugin: cobbler = /opt/terraform/terraform-provider-cobbler
2016/05/26 10:23:15 [DEBUG] Discovered plugin: consul = /opt/terraform/terraform-provider-consul
2016/05/26 10:23:15 [DEBUG] Discovered plugin: datadog = /opt/terraform/terraform-provider-datadog
2016/05/26 10:23:15 [DEBUG] Discovered plugin: digitalocean = /opt/terraform/terraform-provider-digitalocean
2016/05/26 10:23:15 [DEBUG] Discovered plugin: dme = /opt/terraform/terraform-provider-dme
2016/05/26 10:23:15 [DEBUG] Discovered plugin: dnsimple = /opt/terraform/terraform-provider-dnsimple
2016/05/26 10:23:15 [DEBUG] Discovered plugin: docker = /opt/terraform/terraform-provider-docker
2016/05/26 10:23:15 [DEBUG] Discovered plugin: dyn = /opt/terraform/terraform-provider-dyn
2016/05/26 10:23:15 [DEBUG] Discovered plugin: fastly = /opt/terraform/terraform-provider-fastly
2016/05/26 10:23:15 [DEBUG] Discovered plugin: github = /opt/terraform/terraform-provider-github
2016/05/26 10:23:15 [DEBUG] Discovered plugin: google = /opt/terraform/terraform-provider-google
2016/05/26 10:23:15 [DEBUG] Discovered plugin: heroku = /opt/terraform/terraform-provider-heroku
2016/05/26 10:23:15 [DEBUG] Discovered plugin: influxdb = /opt/terraform/terraform-provider-influxdb
2016/05/26 10:23:15 [DEBUG] Discovered plugin: librato = /opt/terraform/terraform-provider-librato
2016/05/26 10:23:15 [DEBUG] Discovered plugin: mailgun = /opt/terraform/terraform-provider-mailgun
2016/05/26 10:23:15 [DEBUG] Discovered plugin: mysql = /opt/terraform/terraform-provider-mysql
2016/05/26 10:23:15 [DEBUG] Discovered plugin: null = /opt/terraform/terraform-provider-null
2016/05/26 10:23:15 [DEBUG] Discovered plugin: openstack = /opt/terraform/terraform-provider-openstack
2016/05/26 10:23:15 [DEBUG] Discovered plugin: packet = /opt/terraform/terraform-provider-packet
2016/05/26 10:23:15 [DEBUG] Discovered plugin: postgresql = /opt/terraform/terraform-provider-postgresql
2016/05/26 10:23:15 [DEBUG] Discovered plugin: powerdns = /opt/terraform/terraform-provider-powerdns
2016/05/26 10:23:15 [DEBUG] Discovered plugin: rundeck = /opt/terraform/terraform-provider-rundeck
2016/05/26 10:23:15 [DEBUG] Discovered plugin: softlayer = /opt/terraform/terraform-provider-softlayer
2016/05/26 10:23:15 [DEBUG] Discovered plugin: statuscake = /opt/terraform/terraform-provider-statuscake
2016/05/26 10:23:15 [DEBUG] Discovered plugin: template = /opt/terraform/terraform-provider-template
2016/05/26 10:23:15 [DEBUG] Discovered plugin: terraform = /opt/terraform/terraform-provider-terraform
2016/05/26 10:23:15 [DEBUG] Discovered plugin: tls = /opt/terraform/terraform-provider-tls
2016/05/26 10:23:15 [DEBUG] Discovered plugin: triton = /opt/terraform/terraform-provider-triton
2016/05/26 10:23:15 [DEBUG] Discovered plugin: ultradns = /opt/terraform/terraform-provider-ultradns
2016/05/26 10:23:15 [DEBUG] Discovered plugin: vcd = /opt/terraform/terraform-provider-vcd
2016/05/26 10:23:15 [DEBUG] Discovered plugin: vsphere = /opt/terraform/terraform-provider-vsphere
2016/05/26 10:23:15 [DEBUG] Discovered plugin: chef = /opt/terraform/terraform-provisioner-chef
2016/05/26 10:23:15 [DEBUG] Discovered plugin: file = /opt/terraform/terraform-provisioner-file
2016/05/26 10:23:15 [DEBUG] Discovered plugin: local-exec = /opt/terraform/terraform-provisioner-local-exec
2016/05/26 10:23:15 [DEBUG] Discovered plugin: remote-exec = /opt/terraform/terraform-provisioner-remote-exec
2016/05/26 10:23:15 [DEBUG] Detected home directory from env var: /root
2016/05/26 10:23:15 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2016/05/26 10:23:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/05/26 10:23:15 [DEBUG] Detected home directory from env var: /root
2016/05/26 10:23:15 [DEBUG] waiting for all plugin processes to complete...
panic: Unary - is only allowed

goroutine 1 [running]:
panic(0xcafb40, 0xc8201e1260)
/opt/go/src/runtime/panic.go:481 +0x3e6
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.(_parserParserImpl).Parse(0xc8201e7400, 0x7fa86eb916c0, 0xc8201e81e0, 0x0)
lang.y:133 +0x2168
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.parserParse(0x7fa86eb916c0, 0xc8201e81e0, 0x1683a10)
yaccpar:153 +0x9b
github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil.Parse(0xc8201d70c0, 0x12, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/hashicorp/hil/parse.go:27 +0x103
github.com/hashicorp/terraform/config.(_interpolationWalker).Primitive(0xc82015bd90, 0xcafb40, 0xc8201e1060, 0x98, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/interpolate_walk.go:116 +0x155
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk.walkPrimitive(0xcafb40, 0xc8201e1060, 0x98, 0xfd79c0, 0xc82015bd90, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go:186 +0xa9
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk.walk(0xcafb40, 0xc8201e1060, 0x98, 0xfd79c0, 0xc82015bd90, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go:117 +0x312
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk.walkMap(0xcab240, 0xc8201bdd10, 0x15, 0xfd79c0, 0xc82015bd90, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go:159 +0x4cf
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk.walk(0xcab240, 0xc8201bdd10, 0x15, 0xfd79c0, 0xc82015bd90, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go:120 +0x42c
github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk.Walk(0xcab240, 0xc8201bdd10, 0xfd79c0, 0xc82015bd90, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/reflectwalk/reflectwalk.go:70 +0x14c
github.com/hashicorp/terraform/config.(_RawConfig).init(0xc8201cfec0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/raw_config.go:216 +0x11a
github.com/hashicorp/terraform/config.NewRawConfig(0xc8201bdd10, 0xc8201bdd10, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/raw_config.go:44 +0x76
github.com/hashicorp/terraform/config.loadResourcesHcl(0xc8201c2580, 0x0, 0x0, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/loader_hcl.go:457 +0xda1
github.com/hashicorp/terraform/config.(_hclConfigurable).Config(0xc8201aeec0, 0x1043740, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/loader_hcl.go:118 +0xd66
github.com/hashicorp/terraform/config.(_importTree).ConfigTree(0xc8201be1c0, 0x2e, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/import_tree.go:87 +0x68
github.com/hashicorp/terraform/config.LoadFile(0xc820199cb0, 0x2e, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/loader.go:44 +0x80
github.com/hashicorp/terraform/config.LoadDir(0xc820014034, 0x26, 0x11, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/loader.go:91 +0x38c
github.com/hashicorp/terraform/config/module.NewTreeModule(0x0, 0x0, 0xc820014034, 0x26, 0x0, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/config/module/tree.go:40 +0x41
github.com/hashicorp/terraform/command.(_Meta).Context(0xc82018a0f0, 0xc820014034, 0x26, 0x0, 0x0, 0x1, 0x0, 0x0, 0xc, 0x0, ...)
/opt/gopath/src/github.com/hashicorp/terraform/command/meta.go:148 +0x509
github.com/hashicorp/terraform/command.(_GetCommand).Run(0xc82018a0f0, 0xc82000a270, 0x0, 0x0, 0xc820109920)
/opt/gopath/src/github.com/hashicorp/terraform/command/get.go:54 +0x3b1
github.com/hashicorp/terraform/vendor/github.com/mitchellh/cli.(_CLI).Run(0xc8200ba600, 0xc820199380, 0x0, 0x0)
/opt/gopath/src/github.com/hashicorp/terraform/vendor/github.com/mitchellh/cli/cli.go:153 +0x5ee
main.wrappedMain(0x0)
/opt/gopath/src/github.com/hashicorp/terraform/main.go:142 +0xb05
main.realMain(0x0)
/opt/gopath/src/github.com/hashicorp/terraform/main.go:78 +0xa10
main.main()
/opt/gopath/src/github.com/hashicorp/terraform/main.go:21 +0x18
`

@jvdland
Copy link
Author

jvdland commented May 26, 2016

line 96 in ./terraform/digitalocean/main.tf => "${file(/dev/null)}"

Comment that out and it works... What's that line doing there?

@enxebre
Copy link
Contributor

enxebre commented May 26, 2016

Hi! thanks for reporting this.
Seems that we are missing the template = bit plus the second bit needs to be "${file("/dev/null")}" (note the quotation marks) as there is a bug in terraform.

This is how it is in aws https://github.com/Capgemini/Apollo/blob/master/terraform/aws/public-cloud/main.tf#L75

A better way to do it would be using null_resource #702

@jvdland
Copy link
Author

jvdland commented May 26, 2016

OK, that seemed to work.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants