Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deployment Manager update error: Deployment in preview must not have a target with UPDATE

Every time I try to run an update through deployment manager to an existing deployment in preview, I get the error:

$ gcloud deployment-manager deployments update abc --config abc.yaml
ERROR: (gcloud.deployment-manager.deployments.update) ResponseError: code=400, message=Invalid value for field 'resource.target': ''.  Deployment in preview must not have a target with UPDATE

However, if I don't use the update on the gcloud command line and go to the console and click 'deploy' the update goes through fine.

What can be causing this?

like image 378
John S Avatar asked Dec 14 '22 15:12

John S


1 Answers

Just ran into this, I wasn't following the instructions properly. After you created something in preview you do NOT pass the config again you just apply.

create preview

gcloud deployment-manager deployments update my-deployment --config my-config.yaml --preview

run deployment

gcloud deployment-manager deployments update my-deployment

Docs https://cloud.google.com/deployment-manager/docs/deployments/updating-deployments#make_the_update_request

like image 76
Steve Miskiewicz Avatar answered May 19 '23 11:05

Steve Miskiewicz