Hi! does anyone know if there is a way to copy a F...
# prefect-community
Hi! does anyone know if there is a way to copy a Flow from one project to another programmatically?
Hi @Eric - definitely; checkout the
GraphQL mutation, which takes a
and a
corresponding to the new project you’d like to move the flow to
hi @Chris White was just watching a video of yours! thanks for replying. I saw that mutation, but I was hoping to clone vs. move
😄 1
also is there a way to specify a Secret on a per-project basis? basically trying to figure out if there is a graceful way to take an existing deployed flow from Dev and in CI/CD clone it to Prod and update a Secret to bascially flip a variable
At the moment there is no concept of cloning a flow in the backend, so you’d need to reregister the flow to a new project. For per-project secrets, this is a pretty common feature request; we don’t have it available at this exact moment but it is definitely something we’re looking into, especially as we work on more granular permissioning features. What people typically do for per-run / per-flow secrets is create a Secret with a changing name (e.g.,
) and then dynamically set the name of the secret within your flow code based on flow_id / labels / whatever info is most relevant
The prefect secret task allows you to provide a name at runtime rather than at initialization
that'sa good call re: Secret task, I could probably leverage that
super helpful here!!
thank you love the package.
anytime!! Glad it’s useful to you 😄