EnvironmentVariable

Environment variables for this build.

JSON representation
{
  "variable": string,
  "availability": [
    enum (EnvironmentVariable.Availability)
  ],
  "origin": enum (EnvironmentVariable.Origin),
  "originFileName": string,

  // Union field source can be only one of the following:
  "value": string,
  "secret": string
  // End of list of possible types for union field source.
}
Fields
variable

string

Required. The name of the environment variable. The environment variables reserved by Cloud Run should not be set. Additionally, variable names cannot start with "X_FIREBASE_".

availability[]

enum (EnvironmentVariable.Availability)

Optional. Where this variable should be made available. If left unspecified, will be available in both BUILD and BACKEND.

origin

enum (EnvironmentVariable.Origin)

Output only. The high-level origin category of the environment variable.

originFileName

string

Output only. Specific detail about the source. For APPHOSTING_YAML origins, this will contain the exact filename, such as "apphosting.yaml" or "apphosting.staging.yaml".

Union field source. The source of a variable's value. source can be only one of the following:
value

string

A plaintext value. This value is encrypted at rest, but all project readers can view the value when reading your backend configuration.

secret

string

A fully qualified secret version. The value of the secret will be accessed once while building the application and once per cold start of the container at runtime. The service account used by Cloud Build and by Cloud Run must each have the secretmanager.versions.access permission on the secret.

EnvironmentVariable.Availability

Represents where the variable is available.

Enums
AVAILABILITY_UNSPECIFIED The default value, unspecified, which is unused.
BUILD This value is available when creating a Build from source code.
RUNTIME This value is available at runtime within Cloud Run.

EnvironmentVariable.Origin

Represents the origin category of an environment variable.

Enums
ORIGIN_UNSPECIFIED Source is unspecified.
BACKEND_OVERRIDES Variable was set on the backend resource (e.g. via API or Console). Represents variables from Backend.override_env
BUILD_CONFIG Variable was provided specifically for the build upon creation via the Build.Config.env field. Only used for pre-built images.
APPHOSTING_YAML Variable is defined in apphosting.yaml file.
FIREBASE_SYSTEM Variable is defined provided by the firebase platform.