Using environment groups in render.yaml - did not find expected key

I just created a render account and I’m trying to deploy my first service using a blueprint render.yaml file. I went in the UI and created an environment group called “my-server” and added all of my environment variables to it. I’m trying to reference this in the render.yaml file like so:

    envVars:
      - key: CELERY_BROKER_URL
        fromService:
          name: celery-redis
          type: redis
          property: connectionString
      - key: CELERY_RESULT_BACKEND
        fromService:
          name: celery-redis
          type: redis
          property: connectionString
      - fromGroup: my-server

I want to use the env vars from the redis service being created as well as the ones from my environment group. Whenever I try to go to Blueprints and select my branch it pulls in the render.yaml file and gives me the error “did not find expected key” on the -fromGroup line. I’m sure I’m missing something obvious here but it’s driving me a little crazy. Appreciate the help!

im guessing I need to create an envVarGroups section at the bottom of my render.yaml and then list out all of the environment variables again with sync: false in order for this to work.

I was hoping I could just consume the environment variables from the group I created through the Env Group web UI :confused:

I’ve also noticed that even if I change from using fromGroup to just listing out all of the keys individually the error always occurs on the last line of the envVars block, I’ve checked the indentation and everything looks correct to me and lines up.

As suspected it ended up being something stupid. I had quotes around my buildCommand and startCommand, after I removed them it was able to process my render.yaml properly.

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