Hello! I want to provision Prefect push workpools...
# ask-community
c
Hello! I want to provision Prefect push workpools as part of my IaC deployment (which is managed by Pulumi). I am working in a Windows environment (Powershell CLI). Using Pulumi, I can trigger an invocation of a python script against a python environment of my choosing. I have already worked out the required JSON for my workpool (experimentation) and have a JSON file containing the required configuration. I was hoping to be able to use
prefect.cli.cloud
to provision my workpool:
Copy code
def create_push_workpool():
    # * Login
    prefect.cli.cloud.login(key="<MY KEY GOES HERE>")
    prefect.cli.cloud.confirm_logged_in()
    # * Create work pool
    work_pool.create(name="nde-iac-push-workpool", type="Ecs:push", base_job_template="confs/dev/push_workpool_job_template.json", paused=False)
    return
However, the login call is failing with
Copy code
AttributeError: 'PrefectTyper' object has no attribute 'console'
Would appreciate some help/guidance/pointers!