Project environments seem to prevent infrastructure deployment

We recently organised our services by project and environment in Render, when the new UI became available. I know, stupid, I should never have used the UI, and stuck to infrastructure-as-code. Now our infrastructure as code has broken and we effectively can’t control our services properly any more.

When trying to synchronise my blueprint with I get an error:

There was a problem syncing with your render.yaml:

services[10].envVars[0].fromGroup
new service cannot link to env group “staging-gateway” which is in environment “staging”

This is the first time I’ve added a new service to the infrastructure file. It seems the YAML specification is missing definitions for project and environment, that MUST be present since the changes in Render related to projects and environments.
EDIT:

It seems this is a duplicate of another thread named “Frustrations using Blueprint + Environments + Environment Groups” which I can’t link here for some reason.

I’d like to ask the Render team to really prioritise this, as it’s very nasty when seemingly innocuous, UI actions turn out to:

  • Break IaC
  • Are irreversible

Hi there,

The cause of what you’re experiencing here is down to environment scoped envvar groups, and as you’ve correctly identified, we have a gap between using those via the dashboard and Blueprints.

There are a few options to workaround this whilst this gap exists:

Remove the fromGroup definition from the render.yaml, push the code and let the service create, it’s ok if it fails to deploy due to missing vars. Then manually move the service into the environment and then re-add the fromGroup definition and resync.

OR

Manually create the service using the same name as the render.yaml definition inside the environment and then trigger a sync, choosing to update the existing service and the render.yaml settings will be applied to it.

OR

Decide whether use linked env var groups at all.

Either of these options should unblock you here.

Regards,