0

I am migrating a single module application into a multiple module application. As part of my deployment process I am setting an environment variable to hold the current QA environment: 'dev', 'stage', or 'test'.

When deploying my old 'default' module, it is able to read this environment variable. However, understandably, the new module 'background' has no access to this environment variable, since it is in a separate process.

Is there an easy way to share information across modules within an application or am I stuck writing app.yaml files for each module multiplied by the number of QA environments?

alphanumeric0
  • 45
  • 1
  • 5

1 Answers1

0

You have to write a .yaml files for each and every module no matter what - that's what makes it a module :)

However, in general, you can re-use a file in multiple modules by symlink-ing it into the respective modules (personally I prefer to put the actual version-controlled file in the app's dir, outside a particular module dir).

Depending on how exactly you implement the metadata/environment passing you might be able to use a smaller cross-module shared file to complement the module-specific .yaml file (only some of the app.yaml directives can be shared like this, tho).

See for example this Q&A focusing on re-using of the skip_files directive: Do I need to copy `skip_files` across multiple YAML files?

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