Skip to content

runtime error: invalid memory address or nil pointer -- v1.4.0 #32810

@Rajaneeshs

Description

@Rajaneeshs

Terraform Version

Terraform v1.4.0
on linux_arm64
+ provider registry.terraform.io/gavinbunney/kubectl v1.14.0
+ provider registry.terraform.io/hashicorp/aws v4.48.0
+ provider registry.terraform.io/hashicorp/helm v2.8.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.16.1
+ provider registry.terraform.io/hashicorp/template v2.2.0

Terraform Configuration Files

...terraform config...

Debug Output

https://gist.github.com/Rajaneeshs/3fc45748b6121aa20b6f44a0261fcc0e#file-terraform_1-4_crash
`
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
Please report the crash with Terraform1 so that we can fix this.

When reporting bugs, please include your terraform version, the stack trace
shown below, and any additional information which may help replicate the issue.

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

runtime error: invalid memory address or nil pointer dereference
goroutine 31 [running]:
runtime/debug.Stack()
/snap/go/10053/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
/snap/go/10053/src/runtime/debug/stack.go:16 +0x1c
github.com/hashicorp/terraform/internal/logging.PanicHandler()
/build/snapcraft-terraform-00d25aad70fc9371b21424630507d11c/parts/terraform/build/internal/logging/panic.go:55 +0x170
panic({0x1cd2f00, 0x3a0a730})
/snap/go/10053/src/runtime/panic.go:884 +0x20c
github.com/hashicorp/terraform/internal/plans.(*Plan).CanApply(0x0?)
/build/snapcraft-terraform-00d25aad70fc9371b21424630507d11c/parts/terraform/build/internal/plans/plan.go:100 +0x18
github.com/hashicorp/terraform/internal/backend/local.(*Local).opPlan(0x4000a32fa0, {0x2663198, 0x400072f880}, {0x2663198, 0x400072f8c0}, 0x40007b7680, 0x400072e8c0)
/build/snapcraft-terraform-00d25aad70fc9371b21424630507d11c/parts/terraform/build/internal/backend/local/backend_plan.go:104 +0x4dc
github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation.func1()
/build/snapcraft-terraform-00d25aad70fc9371b21424630507d11c/parts/terraform/build/internal/backend/local/backend.go:323 +0xd8
created by github.com/hashicorp/terraform/internal/backend/local.(*Local).Operation
/build/snapcraft-terraform-00d25aad70fc9371b21424630507d11c/parts/terraform/build/internal/backend/local/backend.go:316 +0x444
`

Expected Behavior

Plan should succeed

Actual Behavior

Plan crashes

Steps to Reproduce

Steps to Reproduce

  1. terraform version v1.4.0
  2. terraform init -backend-config=backend.txt
  3. terraform plan

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

Labels

bugnewnew issue not yet triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions