https://prefect.io logo
#prefect-community
Title
# prefect-community
j

James Phoenix

06/26/2022, 4:10 PM
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.
k

Kevin Kho

06/26/2022, 9:14 PM
Hi James, I will just move the code to this thread to clear up the main channel.
Copy code
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
Copy code
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
j

James Phoenix

06/27/2022, 6:26 AM
Thanks @Kevin Kho
4 Views