1

I have created a GCP Project and using App Engine standard environment for deployment purposes. I have various developers working with me on the same project and deploying on App engine using various versions, however, we are using a default version to which all the traffic is allocated.

  • So are there any ways by which we can restrict the deployment on the default version. i.e we want specific people to be able to deploy on default version without removing deployment rights of other people on the same project.
  • And is there any alternative approach to this situation.
skaul05
  • 2,154
  • 3
  • 16
  • 26

2 Answers2

2

It depends on the runtime where you are deploying the application.

For example, in Python, if you are using the command gcloud app deploy (see the documentation), you can do the following:

gcloud app deploy --no-promote --version=<MY-VERSION-NAME>

The --no promote flag will avoid allocating all of the traffic to the version you are deploying, while the --version=<MY-VERSION-NAME> specifies the name of the version that you will create from the deployment, and replace an older one with the same name if it exists.

Joan Grau Noël
  • 3,084
  • 12
  • 21
  • I don't want to avoid the traffic to the default version. I want only some people to be able to deploy on default version. – skaul05 Jan 22 '19 at 10:59
  • What do you mean by the `default version`? Do you mean the `default` [service](https://cloud.google.com/appengine/docs/standard/python/an-overview-of-app-engine#components_of_an_application)? Because there is no such default version, since everything you deploy, if you don't specify a target version, a new one is automatically generated. – Joan Grau Noël Jan 22 '19 at 11:13
0

AFAIK there is no way to restrict deployment of a specific version. All access control method revolve around a certain identity being allowed access to deploy a certain GAE project or not. The version string used (i.e the version being deployed to in your approach) is irrelevant.

This falls into the "allows you to separate IAM roles" advantage mentioned in the accepted answer to Advantages of implementing CI/CD environments at GAE project/app level vs service/module level?.

As a note: you're attempting to implement environments at the service/module version level, which is IMHO worse than both methods compared in that post, see Continuous integration/deployment/delivery on Google App Engine, too risky?

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97