Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

[BUG REPORT] gcloud run deploy rejects integer values specified in env-vars-file

niI
New Member

My env.yml has lines like `DATABASE_PORT: 5432`. When I run `gcloud run deploy SERVICE --env-vars-file env.yml --source .`, it crashed with:

```

This command is equivalent to running `gcloud builds submit --tag [IMAGE] .` and `gcloud run deploy booster-py-staging --image [IMAGE]`

Building using Dockerfile and deploying container to Cloud Run service [REDACTED] in project [REDACTED] region [REDACTED]
X Building and deploying... Building Container.
✓ Uploading sources...
✓ Building Container... Logs are available at [REDEACTED].
. Creating Revision...
. Routing traffic...
Deployment failed
ERROR: gcloud crashed (ValidationError): Expected type <class 'str'> for field value, found 5432 (type <class 'int'>)

```

0 1 421
1 REPLY 1

The env file is yaml formatted, and the env-var expects a string.  DATABASE_PORT: "5432" should work (wrap the number in quotes).