In addition to wat Jason said, you might also want to take at the "includes" directive to avoid repeating yourself:
https://cloud.google.com/appengine/docs/standard/python/config/apprefSo you could do something like:
- have a common "services.yaml" somewhere
- in each of the dev / stage / prod yaml just put the information specific for that env and include the common services yaml
Sidenote: we have a small helper script for our GAE projects so that we can do some more processing around running / deploying and we generate our app.yaml's dynamically:
def _buildAppYamls(for_deployment):
app_yaml_templates = _findInAppengineModules('app-template.yaml')
for template in app_yaml_templates:
content = _load(template)
d = os.path.dirname(template)
module = os.path.basename(d)
if module != 'main':
module_tag = 'service' if for_deployment else 'module'
content = '%s: %s\n%s' % (module_tag, module, content)
if not for_production:
content = 'version: local-development\n' + content
with open(os.path.join(d, 'app.yaml'), 'w') as f:
f.write(content)