Description
Describe the bug
I installed Gaia using Helm with the following command:
helm install gaia https://github.com/gaia-app/chart/archive/refs/tags/v0.1.2.tar.gz --namespace gaia
After adding AWS credentials through the Gaia UI, we were able to create AWS resources successfully.
However, when trying to create GCP resources, I uploaded the JSON file of a GCP service account and created the stack. But when running the plan command, it seems that the JSON file is not being passed completely
Plan logs
gaia] running terraform job
?
? Error: error unmarshaling credentials: unexpected end of JSON input
?
? with provider["registry.terraform.io/hashicorp/google"],
? on main.tf line 2, in provider "google":
? 2: provider "google" {
?
?
Planning failed. Terraform encountered an error while generating this plan.
[gaia] analysing plan
{"timestamp":"2025-01-30T12:23:38.865+00:00","status":400,"error":"Bad Request","path":"/api/runner/stacks/154bbef3-ca1b-4762-86fd-e5
Pod manifest for job
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: 2025-01-30T12:23:25Z
name: gaia-job-eb5e79da-a261-4d8a-a270-243f5e225e2f
namespace: utils
resourceVersion: "46907480"
uid: 125803a8-84d4-48fa-8eed-b9eced5263d2
spec:
containers:
- command:
- /bin/sh
env:
- name: TF_IN_AUTOMATION
value: "true"
**- name: GOOGLE_CREDENTIALS**
value: |-
{
"type": "service_account",
"project_id": "xyz",
"private_key_id": "ee8bd92e2c7e126b994ce0c0b056d9fa6",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC1ag+qO9ZVbmOp\n18lkp7E8YQbk4JpBZAKa9fCVW/sUqFoEaJjklc3vk+78tgRLyCxV7/PjTGLEvTJW\nLAk3ZissfynQ7BYrL2Gt8w5tlDkHgWBOoEoII479kTsdXzPy2mAHgUsOXil0vSni\nsqoSf2dQybapmssvm4nit7XsOF25mKB6jFz8dcV40dTzCk5lIkFrLEqfDsgNYNDe\nQCgqryVFbV++mEqlbO9WdTeSHWYHb06kSJv/lIBdJS9TK6W8rSmKW+EQDtYeOA6B\ncLlwFNYv3JLHVrcpLsFnXKVHN3uL9zrt9Qsu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aBoiJ3g3cUa7
- name: GOOGLE_PROJECT
value: xyz
image: hashicorp/terraform:latest
imagePullPolicy: Always
name: terraform
resources: {}
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-p94x5
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: xyz
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
To Reproduce
Steps to reproduce the behavior:
- Add the GCP service account on gaia UI in credentials page
- Add an module where i have the Terraform codes
- Create a stack and try to run plan
- See error
Expected behavior
Plan should work in the case of GCP based stack
Screenshots
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [chrome]
Additional context
Add any other context about the problem here.