Which env var takes precedence in a blueprint?

Suppose I had the following defined in my blueprint.

    envVars:
      - fromGroup: my-app-env-group
      - key: REDIS_URL
        fromService:
          type: redis
          name: my-app-redis
          property: connectionString

, and in the my-app-env-group Env Group I had also defined a differentREDIS_URL (via the web UI). Which value of REDIS_URL would be made available to the application, the one specified in the blueprint or the one in the Env Group?

I am hoping that I can override env vars defined in an env group with those specified in the blueprint.

(My use case is that I am trying to use blueprints to define a set of services that will then be spun up for a preview environment. I want the env vars to be dynamically generated for the particular environment - either prod or preview - without affecting the other env vars in the env group.)

Hi Olly,

If an environment variable with the same key is defined both directly in the service and in a linked env group, the value defined in the service will take precedence.

Regards,

Matt

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.