Creating Volume Mounts or Files from Prefect Secrets

Welcome back @Tyler_Wanner, great to see you here! :wave:

For 1.0, one pattern you may follow is described here:

Essentially you would store all sensitive dbt profile information in your Prefect Secrets and reference those in the DbtShellTask.


For Prefect 2.0 though, we provide much easier building blocks to do that, which are literally called Blocks. You can store all your sensitive data there and reference it on your prefect-dbt tasks as shown here:

For reference here is dbt collection:


Another alternative, although not secure, would be baking your dbt profile file into your container image and reference the path on the DbtShellTask