swift-garage-61180
05/22/2024, 10:00 AMRABBIT_URL
and REDIS_URL
variables in the migrations
action.
Action-level variables function as overrides for the project/environment-level ones. So if you simply skip these lines:\
RABBIT_URL: ${var.RABBIT_URL} # This gets detected as as circular dependency
REDIS_URL: ${var.REDIS_URL}
and keep these lines as they are:
tasks:
- name: migrations
command: [/bin/sh, -c]
args: ["npm run migrations:up"]
env:
RABBIT_URL: ${var.RABBIT_URL}
REDIS_URL: ${var.REDIS_URL}
The RABBIT_URL
and REDIS_URL
env vars should be read from the project-level variables without you needing to bring them in “manually” in the action-level variables.
I do think it would be nice to be able to reference project-level variables in a template expression for an action variable with the same name, but we’d need to be careful not to break the circular dependency detection where it’s actually desirable.
Hope this clarifies things!
Are there any other blockers for you to upgrade to Bonsai?