Daniel
10/10/2024, 2:26 PMMarvin
10/10/2024, 2:26 PMprefect.yaml
file, you will need to use the job_variables
section. Here is how you can structure your YAML file to include the environment variables:
yaml
deployments:
- name: demo-deployment
entrypoint: demo_project/demo_flow.py:some_work
work_pool:
name: local
schedule: null
job_variables:
env:
EXECUTION_ENVIRONMENT: "YourValue"
MY_NOT_SO_SECRET_CONFIG: "AnotherValue"
In this example, two environment variables, EXECUTION_ENVIRONMENT
and MY_NOT_SO_SECRET_CONFIG
, are being set with the values "YourValue"
and "AnotherValue"
respectively. You can change these keys and values to whatever suits your deployment needs. For complete details, you can refer to the Prefect 2 Documentation on Overriding Job Variables.