e

    Eric

    1 year ago
    Hi! does anyone know if there is a way to copy a Flow from one project to another programmatically?
    Chris White

    Chris White

    1 year ago
    Hi @Eric - definitely; checkout the
    update_flow_project
    GraphQL mutation, which takes a
    flow_id
    and a
    project_id
    corresponding to the new project you’d like to move the flow to
    e

    Eric

    1 year ago
    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
    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
    Chris White

    Chris White

    1 year ago
    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.,
    project-secret-1
    ,
    project2-secret-1
    ) 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
    e

    Eric

    1 year ago
    that'sa good call re: Secret task, I could probably leverage that
    super helpful here!!
    thank you love the package.
    Chris White

    Chris White

    1 year ago
    anytime!! Glad it’s useful to you 😄