Skip to main content
Solved

GKE Terraform Kubernetes App validation Failure for Terraform

  • July 23, 2026
  • 2 replies
  • 47 views

harshal.thakor
Forum|alt.badge.img+5

Getting error while publishing Terraform Kubernetes App. on GCP marketplace.

{
"taskReports": [
{
"taskType": "EXECUTE_TERRAFORM_PLAN",
"taskExecutionStatus": "ISSUES_FOUND",
"digest": "Failed to execute terraform plan for some versions.",
"errorMessage": "Error validating Terraform zip: Marketplace UI deployments must declare a variable 'goog_cm_deployment_name'. This variable specifies the name of the deployment, and should be used to avoid resource name collisions across deployments\n"
}
]
}


Possible solutions I have tried:

I have changed variable.tf file to include variable:

variable "goog_cm_deployment_name" {
description = "Name of the Google Cloud Marketplace deployment. Auto-populated by the Marketplace UI."
type = string
}


Added below in metadata.yaml file:

interfaces:
variables:
# ---- GCP / cluster ---------------------------------------------------
- name: goog_cm_deployment_name
description: The name of the deployment.
varType: string
required: true


Still, I am unable to resolve this error on GCP marketplace. Can anyone help?

Also, I am getting multiple errors one by one(like solving one and getting another), is there any documentation where all requirement listed and sample terraform kubernetes app also available?

Thanks

Best answer by a_aleinikov

The variable declaration itself looks correct, so the validator is probably not seeing the file you changed. Make sure variables.tf is in the root module of the uploaded ZIP, with no parent directory inside the archive, and regenerate metadata.yaml plus metadata.display.yaml from that same root using cft blueprint metadata -p . -q -d --nested=false; then validate with cft blueprint metadata -p . -v before repackaging. Also ensure the deployment name is actually used in resource naming, for example as the Helm release name, rather than only declared in metadata. Google’s packaging guide specifically requires the Terraform files to be at the ZIP root and recommends starting from the official Terraform Kubernetes app starter module.

2 replies

a_aleinikov
Forum|alt.badge.img+8
  • Bronze 2
  • Answer
  • July 25, 2026

The variable declaration itself looks correct, so the validator is probably not seeing the file you changed. Make sure variables.tf is in the root module of the uploaded ZIP, with no parent directory inside the archive, and regenerate metadata.yaml plus metadata.display.yaml from that same root using cft blueprint metadata -p . -q -d --nested=false; then validate with cft blueprint metadata -p . -v before repackaging. Also ensure the deployment name is actually used in resource naming, for example as the Helm release name, rather than only declared in metadata. Google’s packaging guide specifically requires the Terraform files to be at the ZIP root and recommends starting from the official Terraform Kubernetes app starter module.


harshal.thakor
Forum|alt.badge.img+5

Thanks, I also need to add it in metadata.display.yaml. It worked.