There is no particular write-protection for a given version. I can think of two solutions in your case:
You could use two user accounts, where only one of them has the permission to upload new versions, and normally you would use the other (restricted) account for your day-to-day work between deployments. In Google Cloud Platform you would use roles to manage access, where a role is like a list of permissions, that can be assigned to individual user accounts, Google groups, all users in a G Suite domain or Cloud Identity domain, or service accounts. The pre-defined roles with App Engine <https://cloud.google.com/appengine/docs/standard/python/access-control#predefined_app_engine_roles> already provide a separation, see "App Engine Deployer" and also the additional information later on that page regarding deployment and traffic management. If you don't want to handle two accounts, but have some kind of an additional step after an (accidental) deployment, then I suggest to utilize App Engine's version management and the *gcloud app deploy* options "--no-promote" flag and not to stop the previous version. *Set default config settings:* As you might know, you can manage SDK configurations <https://cloud.google.com/sdk/docs/configurations> in Cloud SDK where you can store default settings, even multiple configurations. But I assume you only have one project and thus only one configuration (the DEFAULT configuration). You can just store the defaults in your gcloud configuration. In *gcloud app deploy*, *--promote* or *--no-promote* flag tells App Engine whether traffic should be automatically migrated from the previous version to the new version. Turn the promote off by default for all your *gcloud app deploy* commands in this config: $ gcloud config set app/promote_by_default false Updated property [app/promote_by_default]. The next option will prevent that a previous version is automatically stopped when you deploy a new version: $ gcloud config set app/stop_previous_version false Updated property [app/stop_previous_version]. Verify that your configuration is correctly set under the *[app]* section (that's the one for App Engine specific configurations): $ gcloud config list [app] promote_by_default = False stop_previous_version = False You only need to repeat these steps, if you have a new gcloud installation or if you want to create a new gcloud configuration. *Future Deployments in two steps:* *Step 1:* From now on, only use *gcoud app deploy* without specifying a version (*--version*), without the *--pomote* flag, and without the *--stop-previous-version*. Just something like this: gcloud app deploy . As no *--version* is provided, App Engine will create a new version and give it an automatically created version name (looks like an ISO timestamp starting with the year, e.g. 20180630....). The new version will not be the new default version, and the previous version will not stop to serve traffic. So the deployment has no effect to your users until now. *Step 2:* Next in gcloud or in the Web UI: - The deployment was accidental: just delete the accidentally created version (typically the newest one) - The deployment was intentional: migrate traffic to the new version or make it the new default version You can occasionally delete very old versions, so you won't hit the 200 versions limit per app again. Best regards, Ani On Friday, June 29, 2018 at 9:06:29 PM UTC+2, Guy Dviri wrote: > > I reply thanks you 2 hours ago , but I don't see the reply in the thread , >> google groups UI must change their layout in my opinion , >> > any way I like to ask @Ani one more thing , is it possible to block > version from updating , let's say that it will be update only with special > key,, or something like that , to prevent update by mistake.. > do you know some way to do it? > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/d8ba1ba7-5722-486a-84a6-4789da7d39e2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
