Placeholder Environment Variables

I set up a new project from a blueprint that started with just a Postgres instance so i could configure the databases prior to adding the web services, and have values for database env vars ready to go.

I then added the web services to the blueprint, pushed to the repo and it started the synch process in render (creating and attempting to spin up the web services). There were a number of placeholder env vars defined for the web services, that don’t show up after the second synch that added said web services.

Is this expected behavior? Is the only chance to add placeholder env vars on the first blueprint synch?

services:

  # Prod
  - type: web
    name: CMS Prod Web
    env: docker
    repo: omitted
    region: oregon
    plan: starter
    branch: main
    dockerfilePath: Dockerfile.prod
    scaling:
      minInstances: 1
      maxInstances: 3
      targetMemoryPercent: 90 # optional if targetCPUPercent is set
      targetCPUPercent: 90 # optional if targetMemory is set.
    healthCheckPath: /health-check
    autoDeploy: true
    envVars:
      - key: RAILS_ENV
        value: production
      - key: DATABASE_URL
        sync: false
      - key: RAILS_MASTER_KEY
        sync: false
      - key: AWS_SECRET_ACCESS_KEY
        sync: false
      - key: AWS_ACCESS_KEY_ID
        sync: false
      # Use Datadog env group
      - fromGroup: DD Agent Service
      # Use Cloudflare
      - fromGroup: Cloudflare API


  # Dev
  - type: web
    name: CMS Dev Web
    env: docker
    repo: omitted
    region: oregon
    plan: starter
    branch: dev
    dockerfilePath: Dockerfile.prod
    healthCheckPath: /health-check
    autoDeploy: true
    envVars:
      - key: RAILS_ENV
        value: remote_development
      - key: DATABASE_URL
        sync: false
      - key: RAILS_MASTER_KEY
        sync: false
      - key: AWS_SECRET_ACCESS_KEY
        sync: false
      - key: AWS_ACCESS_KEY_ID
        sync: false
      # Use Cloudflare
      - fromGroup: Cloudflare API

databases:

  - name: CMS Postgres
    plan: starter

Hi Jason,

This is an issue we are currently working to fix. I understand it somewhat defeats the purpose of having a Blueprint but for now the easiest way to handle sync:false variables is to create an environment group in the dashboard and reference it in your Blueprint like you did with your Cloudflare API group.

Best,
Tyler

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