James Phoenix

    James Phoenix

    2 months ago
    Looks like when I run the CLI command for this on orion, I am not able to provide a service account credential for GCP buckets.
    Kevin Kho

    Kevin Kho

    2 months ago
    Hi James, I will just move the code to this thread to clear up the main channel.
    from prefect.deployments import DeploymentSpec
    from prefect import flow, get_run_logger
    from prefect.blocks.storage import GoogleCloudStorageBlock
    
    storage_block = GoogleCloudStorageBlock(
         bucket='prefect_source_data',
         project='marketingsimulations',
    )
    
    
    @flow(name="Testing")
    def basic_flow():
        logger = get_run_logger()
        logger.warning("The fun is about to begin")
    
    DeploymentSpec(
        flow=basic_flow,
        name="Test Deployment",
        tags=['tutorial', 'test'],
        flow_storage=storage_block
    
    )
    James said he got this working with
    export GOOGLE_APPLICATION_CREDENTIALS=service-account.json
    I am consolidating this to archive with Marvin@Marvin open “Orion Request - Set GCP Credentials when Creating Storage”
    I agree it’s weird that it’s asymmetric with AWS
    Marvin

    Marvin

    2 months ago
    James Phoenix

    James Phoenix

    2 months ago
    Thanks @Kevin Kho