<@ULVA73B9P> how do i pass environment variables t...
# ask-marvin
p
@Marvin how do i pass environment variables to prefect.yaml file?
m
You can set environment variables for Prefect in two ways: 1. Using Prefect CLI commands: You can use the
prefect config set
command to set environment variables. For example:
Copy code
prefect config set PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/[ACCOUNT-ID]/workspaces/[WORKSPACE-ID]>"
   prefect config set PREFECT_API_KEY="[API-KEY]"
In this example,
PREFECT_API_URL
and
PREFECT_API_KEY
are set in the default profile. You can create different profiles for different configurations using the
prefect profile
CLI commands. 2. Setting as Environment Variables: You can also set
PREFECT_API_URL
and
PREFECT_API_KEY
as you would any other environment variable. For more information, you can refer to the Prefect documentation here and here.
p
Thank you!