Luke Puplett
Luke Puplett

Reputation: 45135

Deploying Cloud Run via YAML gives Revision named 'yourservicename-00001-soj' with different configuration already exists

When using the following command to deploy a new Cloud Run revision,

gcloud run services replace service.yaml

The deployment fails with this error

ERROR: (gcloud.run.services.replace) ALREADY_EXISTS: Revision named 'yourservicename-00001-soj' with different configuration already exists.

This occurs when you have followed Google's documentation which instructs you to pull down the current service YAML description into a file, make edits and then redeploy it.

Upvotes: 6

Views: 2196

Answers (1)

Luke Puplett
Luke Puplett

Reputation: 45135

This is because the documentation is wrong, or Google's service has regressed since it was authored.

Edit the YAML and remove spec.template.metadata.name and try again.

Upvotes: 9

Related Questions