Daniel Boschbach
03/19/2025, 6:27 PMprefect_worker_metadata
would look like when I want to make some customizations to the worker template?Marvin
03/19/2025, 6:27 PMprefect_worker_metadata
, which defines the behavior of the worker executing flow runs. Here's a brief overview of how this can be structured:
1. Base Job Template: Each work pool has a base job template that acts as a contract, defining the configuration passed to the worker for each flow run. This consists of:
- Job Configuration: Contains the actual configuration that gets interpolated with values from the variables section.
- Variables: Defines fields that can be customized per deployment or flow run, following the OpenAPI specification. This allows you to place constraints like type, minimum, and maximum values.
2. Customization: You can customize the worker template by specifying these configurations in your Terraform setup.
Unfortunately, there isn't a specific example in the search results for prefect_worker_metadata
in Terraform. However, you can refer to the Prefect Work Pools documentation for more detailed guidance on configuring work pools and worker templates.
If you need further assistance, you might want to explore Prefect's GitHub repositories or community forums for more specific examples or discussions.Mitch Nielsen
03/19/2025, 6:30 PMbase_job_template
Daniel Boschbach
03/19/2025, 6:30 PMdata "prefect_worker_metadata"
?Daniel Boschbach
03/19/2025, 6:31 PMdata "prefect_worker_metadata"
Does that take a json payload?Mitch Nielsen
03/19/2025, 6:33 PMprefect_worker_metadata
is just a datasource, so it only reads information:
Use this data source to get the default base job configurations for those common Worker types.if you want to create a customized base job template, you'd use the
prefect_work_pool
resource and provide the base_job_template
attribute with your JSON payloadDaniel Boschbach
03/19/2025, 6:45 PM