 gs://zenml-bucket-sl                            ┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

After having set up or decided on a GCP Service Connector to use to connect to the target GCS bucket, you can register the GCS Artifact Store as follows:

# Register the GCS artifact-store and reference the target GCS bucket

zenml artifact-store register <GCS_STORE_NAME> -f gcp \

--path='gs://your-bucket'

# Connect the GCS artifact-store to the target bucket via a GCP Service Connector

zenml artifact-store connect <GCS_STORE_NAME> -i

A non-interactive version that connects the GCS Artifact Store to a target GCP Service Connector:

zenml artifact-store connect <GCS_STORE_NAME> --connector <CONNECTOR_ID>

Example Command Output

$ zenml artifact-store connect gcs-zenml-bucket-sl --connector gcs-zenml-bucket-sl

Successfully connected artifact store `gcs-zenml-bucket-sl` to the following resources:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┓

┃             CONNECTOR ID             │ CONNECTOR NAME      │ CONNECTOR TYPE │ RESOURCE TYPE │ RESOURCE NAMES       ┃

┠──────────────────────────────────────┼─────────────────────┼────────────────┼───────────────┼──────────────────────┨

┃ 2a0bec1b-9787-4bd7-8d4a-9a47b6f61643 │ gcs-zenml-bucket-sl │ 🔵 gcp         │ 📦 gcs-bucket │ gs://zenml-bucket-sl ┃

┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┛

As a final step, you can use the GCS Artifact Store in a ZenML Stack:

# Register and set a stack with the new artifact store

zenml stack register <STACK_NAME> -a <GCS_STORE_NAME> ... --set

When you register the GCS Artifact Store, you can generate a GCP Service Account Key , store it in a ZenML Secret and then reference it in the Artifact Store configuration.

This method has some advantages over the implicit authentication method: