<@ULVA73B9P> I have a project that includes 2 bloc...
# ask-marvin
j
@Marvin I have a project that includes 2 blocks, 4 variables, and a work pool. Is there a way to label/tag/group all these resources so it's easy to find parts that are related to one another?
m
thought for 475.6 seconds
Great question. Short answer: there isn’t a single, cross-resource tagging system that applies to blocks, variables, and work pools together in Prefect 3.x. Here’s what’s supported today and some practical ways to group related resources: What you can do - Variables: support tags - CLI
Copy code
prefect variable set DB_URL "postgres://..." --tag project:myproj --tag env:prod
- Python
Copy code
from prefect.variables import Variable

    Variable.set(
        "DB_URL",
        "postgres://...",
        tags=["project:myproj", "env:prod"],
        overwrite=True,
    )
- You can use these tags to filter/search on the Variables page. - Work pools: no tags, but you can add a description and use naming conventions - CLI
Copy code
prefect work-pool update myproj-k8s-pool --description "project:myproj env:prod"
- Consider prefixing the name with your project/team, e.g.,
myproj-k8s-pool
. - Blocks (block documents): no tags, but naming conventions help - Give block documents a consistent name prefix/suffix, e.g.,
myproj-aws-credentials
,
myproj-s3-storage
. - This makes them easy to find via the UI search and
prefect block ls
. Recommended patterns for grouping - Consistent naming: prefix everything with your project/team/environment, e.g.,
myproj-...
,
team-foo-...
,
prod-...
. - Blocks:
myproj-aws-creds
,
myproj-gcp-creds
- Variables:
myproj-DB_URL
,
myproj-SLACK_WEBHOOK
- Work pool:
myproj-k8s
,
myproj-docker
- Use variable tags to convey project and environment since that’s the one place tags are first-class. I like
project:<name>
and
env:<name>
. - Add keywords to work-pool descriptions to make UI search more effective. - If you need stronger isolation, consider separate workspaces per project (this cleanly separates blocks, variables, and work pools). If you share the names of your two blocks, four variables, and the work pool, I can propose concrete names/tags you can apply right away.