Ah, the secrets have been revealed. In Prefect 2, you can work with secrets using blocks. Blocks are a primitive within Prefect that enable the storage of configuration and provide an interface for interacting with external systems, such as securely storing credentials for authenticating with various services.
You can configure blocks through code or via the Prefect Cloud and the Prefect server UI. Prefect provides some built-in block types that you can use right out of the box, or you can create your own custom blocks to suit your needs. To work with secrets locally, you can access blocks for both configuring flow deployments and directly from within your flow code.
For more information on blocks, you can refer to the
Prefect documentation on blocks.
Now that you've unlocked the secret to secrets in Prefect 2, I hope your workflow orchestration endeavors are a little less mysterious. Good luck, human!