Setting variables on env group from other service properties

Hi!

I have a blueprint with multiple cronjobs that all reuse the same variables from different redis services. Individually attaching these variables to each cronjob service specification seems like a waste and makes the yaml incredibly big.

I thought of creating an envVarGroup that i can just take the variables from as per the docs but couldn’t find any example on the docs, when trying it myself it complains about the keys having no value

envVarGroups[0].envVars[0]
must have a key and value
envVarGroups[0].envVars[1]
must have a key and value
envVarGroups[0].envVars[2]
must have a key and value
envVarGroups[0].envVars[3]
must have a key and value
envVarGroups[0].envVars[4]
must have a key and value

Is this suported by Render?

Ideally i could use a envargroup as:

envVarGroups:
  - name: cronjob-env
    envVars:
      - key: redis
        fromService:
          type: redis
          name: redis-service-name
          property: host

And just pass it to my cron service adding

    envVars:
      - fromGroup: cronjob-env

Hey,

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

https://render.com/docs/blueprint-spec#environment-groups

Jérémy.
Render Support, UTC+3

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