GCP paths¶
Two paths are required on every installation. On GCP they are an Artifact
Registry root and a gcs:// bucket path.
The registry¶
The contract splits this into an endpoint and a repository root. The repository name is what appears in the repository-scoped IAM binding:
resource "google_artifact_registry_repository_iam_member" "publish_delegate_repository_writer" {
project = "<gcp-project-id>"
location = "<region>"
repository = "<repository>"
...
}
So the region in the registry path and --region should be the same, because
the binding uses --region as the location.
A host with no repository root is refused:
The runtime image derived from it¶
With no --runtime-image, the image is derived from the registry root:
Set --runtime-image when you mirror the image or pin a tag.
The bucket¶
The bucket name is what the IAM binding grants on, and the prefix is where artifact bytes land:
resource "google_storage_bucket_iam_member" "runtime_bucket_object_admin" {
bucket = "<bucket>"
role = "roles/storage.objectAdmin"
...
}
The grant is bucket-wide on GCS. The prefix organises objects rather than scoping the permission, so a bucket shared with other uses is covered in full by this grant.
The scheme must match the provider¶
--provider gcp with an s3:// path is refused at prepare.
Both must already exist¶
The repository and the bucket are yours. Terraform grants the installation's
identities access to them, and a path naming something absent fails at
terraform apply when the IAM binding cannot resolve its target.
gcloud artifacts repositories describe <repository> --location <region>
gcloud storage buckets describe gs://<bucket>
Run both before prepare and the apply will not surprise you.
Adding them to the bundle's own terraform/main.tf is possible and is a poor
place to own them, for reasons covered in
Registry and bucket schemes.