Prefect Variables as Defaults in Pydantic Models
Is it possible to use a Prefect Variable to define a field's default value in a Pydantic Model?
The flow run submission form should show the default as Prefect Variable, which is evaluated right before the submission of the flow.
The Prefect variable should explicitly not be evaluated at deployment time.
Use Case:
• We have a set of parameters used across several flows, e.g., timeout.
• We want different default values depending on the Prefect Workspace, e.g., a higher prd timeout than dev.
• Prefect Variables give us and our operators a pleasant user experience to maintain those default values.
• The still are able to choose a custom value instead of the variable.