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 crashed! #29101

Closed
moorthy69 opened this issue Jul 6, 2021 · 2 comments
Closed

Terraform crashed! #29101

moorthy69 opened this issue Jul 6, 2021 · 2 comments
Labels
bug new new issue not yet triaged v0.12 Issues (primarily bugs) reported against v0.12 releases

Comments

@moorthy69
Copy link

moorthy69 commented Jul 6, 2021

2021/07/06 03:49:29 [INFO] Terraform version: 0.12.25
2021/07/06 03:49:29 [INFO] Go runtime version: go1.12.13
2021/07/06 03:49:29 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2021/07/06 03:49:29 [DEBUG] Attempting to open CLI config file: /home/narayana/.terraformrc
2021/07/06 03:49:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/07/06 03:49:29 [INFO] CLI command args: []string{"apply"}
2021/07/06 03:49:29 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2021/07/06 03:49:29 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2021/07/06 03:49:29 [DEBUG] New state was assigned lineage "a9fde597-f06a-5f5c-067e-4fcc984a76cf"
2021/07/06 03:49:29 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2021/07/06 03:49:29 [TRACE] Meta.Backend: instantiated backend of type
2021/07/06 03:49:29 [DEBUG] checking for provider in "."
2021/07/06 03:49:29 [DEBUG] checking for provider in "/usr/local/bin"
2021/07/06 03:49:29 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2021/07/06 03:49:29 [DEBUG] found provider "terraform-provider-vsphere_v1.24.0_x4"
2021/07/06 03:49:29 [DEBUG] found valid plugin: "vsphere", "1.24.0", "/home/narayana/fm_gsapps_test_scripts/infrastructure/vmware/v-series_vcenter_fmha/.terraform/plugins/linux_amd64/terraform-provider-vsphere_v1.24.0_x4"
2021/07/06 03:49:29 [DEBUG] checking for provisioner in "."
2021/07/06 03:49:29 [DEBUG] checking for provisioner in "/usr/local/bin"
2021/07/06 03:49:29 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64"
2021/07/06 03:49:29 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/hashicorp/hcl/v2/json.(*peeker).Read(...)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/peeker.go:20
github.com/hashicorp/hcl/v2/json.parseObject.func1(0x0, 0xc000202153, 0x1, 0x405, 0x1f0907f, 0x15, 0xf, 0xc, 0x153, 0xf, ...)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:127 +0xb0
github.com/hashicorp/hcl/v2/json.parseObject(0xc0004203c0, 0xc00041fce0, 0xc000025310, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:233 +0xcb2
github.com/hashicorp/hcl/v2/json.parseValue(0xc0004203c0, 0xc00041fc80, 0x0, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:45 +0x70b
github.com/hashicorp/hcl/v2/json.parseObject(0xc0004203c0, 0xc00041f0e0, 0x1f0907f, 0x15, 0xe, 0x21)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:188 +0x43c
github.com/hashicorp/hcl/v2/json.parseValue(0xc0004203c0, 0xc0004203c0, 0x410, 0x1f0907f, 0x15, 0xf)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:45 +0x70b
github.com/hashicorp/hcl/v2/json.parseFileContent(0xc000202000, 0x358, 0x558, 0x1f0907f, 0x15, 0x0, 0xc0001ea400, 0x4c0302, 0xc00041f020, 0x1bd20e0)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/parser.go:21 +0x155
github.com/hashicorp/hcl/v2/json.Parse(0xc000202000, 0x358, 0x558, 0x1f0907f, 0x15, 0x0, 0x0, 0x4000106, 0x0)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/hashicorp/hcl/[email protected]/json/public.go:21 +0x77
github.com/hashicorp/terraform/command.(*Meta).addVarsFromFile(0xc00003ba40, 0x1f0907f, 0x15, 0xc000000046, 0xc000417e30, 0x0, 0x1, 0x408b99)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/command/meta_vars.go:158 +0x5ee
github.com/hashicorp/terraform/command.(*Meta).collectVariableValues(0xc00003ba40, 0xc00059cff0, 0x0, 0x0, 0xc0001fa750)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/command/meta_vars.go:70 +0xad4
github.com/hashicorp/terraform/command.(*ApplyCommand).Run(0xc00003ba40, 0xc0000bc030, 0x0, 0x0, 0xc000164000)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/command/apply.go:195 +0xd34
github.com/mitchellh/cli.(*CLI).Run(0xc00038e280, 0xc00038e280, 0xc000559d90, 0x1)
/opt/teamcity-agent/work/9e329aa031982669/pkg/mod/github.com/mitchellh/[email protected]/cli.go:255 +0x1f1
main.wrappedMain(0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/main.go:239 +0xc33
main.realMain(0x0)
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/main.go:103 +0xb4
main.main()
/opt/teamcity-agent/work/9e329aa031982669/src/github.com/hashicorp/terraform/main.go:39 +0x3b

Terraform Version

...

Terraform Configuration Files

...

Debug Output

Crash Output

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

@moorthy69 moorthy69 added bug new new issue not yet triaged labels Jul 6, 2021
@alisdair alisdair added the v0.12 Issues (primarily bugs) reported against v0.12 releases label Jul 6, 2021
@alisdair
Copy link
Contributor

alisdair commented Jul 6, 2021

Hi @moorthy69, thanks for reporting this. This looks like a bug which is caused by malformed JSON, which was fixed here: hashicorp/hcl#358

Please upgrade to Terraform 0.13 or later for the fix.

@alisdair alisdair closed this as completed Jul 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug new new issue not yet triaged v0.12 Issues (primarily bugs) reported against v0.12 releases
Projects
None yet
Development

No branches or pull requests

2 participants