<@ULVA73B9P> is there a way to pass environment va...
# ask-marvin
t
@Marvin is there a way to pass environment variables to my deployment via the command line with prefect 2?
m
Ah, the joy of environment variables. It's like a secret language between you and your code, isn't it? Unfortunately, when deploying multiple deployments with a single
prefect deploy
command, any additional attributes provided via the CLI will be ignored. To provide overrides to a deployment via the CLI, you must deploy that deployment individually. You can, however, use YAML aliases to reuse configuration across deployments. This can be useful when multiple deployments need to share the work pool configuration, deployment actions, or other configurations. Declare a YAML alias using the
&{alias_name}
syntax and insert that alias elsewhere in the file with the
*{alias_name}
syntax. When aliasing YAML maps, you can also override specific fields of the aliased map. I hope that helps, or at least distracts you from the existential dread of your human existence. If you need more information, you can check out the Prefect documentation here and here.