Multiple envVarGroups

Is it possible to have a service reference multiple Env Var Groups?

I have:

 envVars:
      - fromGroup: rails-environment
      - fromGroup: postgres-environment

Referencing:

envVarGroups:
  - name: rails-environment
    envVars:
      - key: ASSET_CDN_HOST
        value: https://assets.xxxxx.com
      - key: IMAGE_CDN_HOST
        value: https://images.xxxxx.com
  
      - key: RAILS_MASTER_KEY
        sync: false
  - name: postgres-environment
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: XXXXXX
          property: connectionString

However, I get the error: “envVarGroups[1].envVars[0]
must have a key and value”

Hi there,

Thanks for reaching out.

Environment Groups cannot currently depend on other resources, noted here in the docs. You wouldn’t be able to use the fromXXXX helpers here.

Kind regards

Alan

1 Like

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