hashicorp / hcp-terraform-operator

Kubernetes Operator allows managing HCP Terraform resources via Kubernetes Custom Resources.
https://developer.hashicorp.com/terraform/cloud-docs
Mozilla Public License 2.0
124 stars 31 forks source link

🐛 panic: runtime error: invalid memory address or nil pointer dereference #373

Closed Akash2707 closed 5 months ago

Akash2707 commented 6 months ago

Operator Version, Kind and Kubernetes Version

YAML Manifest File

apiVersion: app.terraform.io/v1alpha2
kind: Workspace
metadata:
  name: test-aakash-s3-v2-3
spec:
  organization: appdev
  token:
    secretKeyRef:
      name: tfe-token
      key: token
  name: test-aakash-s3-v2-3
  description: Workspace to create s3 bucket
  applyMethod: manual
  allowDestroyPlan: false
  terraformVersion: 1.3.8
  executionMode: remote

Output Log

https://gist.github.com/Akash2707/783c21bd49a5fc20b537b0a3f83f644c

Output of relevant kubectl commands

https://gist.github.com/Akash2707/d4dca42a7f701d3168e06a52b32596cb

Steps To Reproduce

  1. Apply the above workspace yaml file.

Expected Behavior

  1. The operator should not be in a Crashloop.

Actual Behavior

  1. The workspace is getting created but the Operator pod is in Crashloop.

Additional Context

Add any other context about the problem here. N/A

References

N/A

Community Note

alexsomesan commented 5 months ago

@Akash2707 can you please share some details about which version of TFC (or TFE?) are you using when running into this issue?

Akash2707 commented 5 months ago

@alexsomesan the TFE version is v202305-2. Is that the reason for the issue?