I have been trying to add my cloud sql instance to...
# ask-community
m
I have been trying to add my cloud sql instance to my job configuration in my work pool but everytime I make the change all deployments using the workpool crashes. My job config that keep crashes, look like this. Does anyone know what I am doing wrong
Copy code
{
  "job_configuration": {
    "env": "{{ env }}",
    "name": "{{ name }}",
    "labels": "{{ labels }}",
    "region": "{{ region }}",
    "command": "{{ command }}",
    "timeout": "{{ timeout }}",
    "job_body": {
      "kind": "Job",
      "spec": {
        "template": {
          "metadata": {
            "annotations": {
              "<http://run.googleapis.com/vpc-access-connector|run.googleapis.com/vpc-access-connector>": "{{ vpc_connector_name }}"
            }
          },
          "spec": {
            "template": {
              "spec": {
                "containers": [
                  {
                    "image": "{{ image }}",
                    "command": "{{ command }}",
                    "resources": {
                      "limits": {
                        "cpu": "{{ cpu }}",
                        "memory": "{{ memory }}"
                      },
                      "requests": {
                        "cpu": "{{ cpu }}",
                        "memory": "{{ memory }}"
                      }
                    }
                  }
                ],
                "timeoutSeconds": "{{ timeout }}",
                "serviceAccountName": "{{ service_account_name }}"
              }
            }
          }
        }
      },
      "metadata": {
        "name": "{{ name }}",
        "annotations": {
          "<http://run.googleapis.com/launch-stage|run.googleapis.com/launch-stage>": "BETA"
        }
      },
      "apiVersion": "<http://run.googleapis.com/v1|run.googleapis.com/v1>"
    },
    "keep_job": "{{ keep_job }}",
    "credentials": "{{ credentials }}"
  }
}
I get an error message that looks like this
Copy code
Failed to generate job configuration: 1 validation error for PushPoolCloudRunWorkerJobConfiguration
job_body
  Value error, Job is missing required attributes at the following paths: /spec/template/spec/template [type=value_error, input_value={'kind': 'Job', 'spec': {...'<http://run.googleapis.com/v1|run.googleapis.com/v1>'}, input_type=dict]
    For further information visit <https://errors.pydantic.dev/2.9/v/value_error>