This message was deleted.
# ask-marvin
s
This message was deleted.
m
To define parameters for deployment in Prefect, you typically edit the deployment details. Here's an example of how you might set or modify parameters within a
deployment.yaml
file before applying the deployment via the Prefect CLI:
Copy code
yaml
# deployment.yaml

version: 2
type: DeploymentSpec
metadata:
  name: my-flow-deployment
  tags:
    - "example"
spec:
  name: my-flow
  flow_location: my_flow.py
  parameters:  # <--- This is where you define your parameters
    parameter1: value1
    parameter2: value2
  ...
Once you have configured your
deployment.yaml
with the desired parameters, you can create the deployment on the Prefect API by running the
prefect deployment apply <deployment-file.yaml>
command. Optionally, you can use the
--upload
flag with this command if you want to upload the deployment's files to remote storage. For ad-hoc runs with custom parameter values that differ from the defaults specified in the deployment, use the UI or CLI to specify custom values for the flow run. Here is how you would apply the deployment using Prefect CLI:
Copy code
shell
$ prefect deployment apply my-flow-deployment.yaml
You can refer to the documentation for block-based deployments for more detailed instructions.