Challenge - 5 Problems
Artifact Registry Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Configuration
intermediate2:00remaining
Creating a Docker repository in Artifact Registry
You want to create a Docker repository named my-docker-repo in Artifact Registry within the us-central1 region. Which gcloud command correctly creates this repository?
Attempts:
2 left
💡 Hint
Remember that Docker repositories use the 'docker' format and location must match your desired region.
✗ Incorrect
The correct command uses '--repository-format=docker' and '--location=us-central1' to create a Docker repository in the specified region. Option C uses the wrong format 'maven'. Option C uses the wrong location 'us-east1'. Option C uses an invalid format 'container'.
❓ Architecture
intermediate2:00remaining
Choosing Artifact Registry location for multi-region access
Your team is distributed across multiple continents and needs fast access to container images stored in Artifact Registry. Which location type should you choose to optimize latency and availability?
Attempts:
2 left
💡 Hint
Think about how Google Cloud manages multi-region locations for global access.
✗ Incorrect
Multi-region locations provide automatic replication and low latency access across a wide area, making them ideal for distributed teams. Single-region locations limit access speed to that region. Creating multiple single-region repositories increases management complexity. Manual replication is error-prone and inefficient.
❓ security
advanced2:00remaining
Configuring IAM permissions for Artifact Registry access
You want to allow a service account to push and pull Docker images from an Artifact Registry repository named prod-repo. Which IAM role should you assign to the service account for the least privilege?
Attempts:
2 left
💡 Hint
Consider the difference between read, write, and admin roles.
✗ Incorrect
The 'roles/artifactregistry.writer' role allows pushing and pulling images, which is the least privilege needed. 'roles/artifactregistry.admin' grants full control, which is more than needed. 'roles/artifactregistry.reader' only allows pulling images. 'roles/storage.objectAdmin' is unrelated to Artifact Registry permissions.
❓ service_behavior
advanced2:00remaining
Understanding Artifact Registry image versioning behavior
You push a Docker image tagged v1.0 to an Artifact Registry repository. Later, you push another image with the same tag v1.0 but different content. What happens to the stored images?
Attempts:
2 left
💡 Hint
Think about how Docker tags work in registries.
✗ Incorrect
Docker tags are mutable pointers to image digests. Pushing a new image with the same tag updates the tag to point to the new image, effectively overwriting the previous tag reference. The old image may still exist by digest but is no longer referenced by that tag. Artifact Registry allows tag updates and does not reject pushes with existing tags.
✅ Best Practice
expert2:00remaining
Implementing secure Artifact Registry access in CI/CD pipelines
You want to securely authenticate your CI/CD pipeline to push images to Artifact Registry without embedding long-lived credentials. Which approach follows best security practices?
Attempts:
2 left
💡 Hint
Consider how to avoid long-lived keys and manual credential management.
✗ Incorrect
Workload Identity Federation allows external identities (like those from CI/CD systems) to impersonate Google service accounts without needing to manage or store long-lived keys, improving security. Using key files or passwords stored in repositories or secrets increases risk. Using developer user credentials is insecure and not recommended.