Max Eggers
07/25/2024, 5:04 PMMarvin
07/25/2024, 5:04 PMjob_variables
section to your prefect.yaml
file. Here is an example payload:
deployments:
- name: demo-deployment
entrypoint: demo_project/demo_flow.py:some_work
work_pool:
name: local
job_variables:
env:
EXECUTION_ENVIRONMENT: staging
MY_NOT_SO_SECRET_CONFIG: plumbus
schedule: null
Deploy the flow with these job variables using:
prefect deploy -n demo-deployment
For more detailed information, you can refer to the Overriding Job Variables Documentation.Max Eggers
07/25/2024, 5:05 PMMarvin
07/25/2024, 5:05 PMPOST /deployments/{DEPLOYMENT_ID}/create_flow_run
{
"parameters": {},
"context": {},
"labels": [],
"infrastructure_overrides": {
"env": {
"MY_NEW_ENV_VAR": "42",
"HELLO": "THERE"
}
}
}
Replace {DEPLOYMENT_ID}
with your actual deployment ID.
The infrastructure_overrides
section allows you to specify environment variables dynamically. For more details, refer to the Overriding Job Variables Documentation.Max Eggers
07/25/2024, 5:06 PM