0
0
GCPcloud~20 mins

Artifact Registry creation in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Artifact Registry Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Configuration
intermediate
2: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?
Agcloud artifacts repositories create my-docker-repo --repository-format=docker --location=us-east1
Bgcloud artifacts repositories create my-docker-repo --repository-format=maven --location=us-central1
Cgcloud artifacts repositories create my-docker-repo --repository-format=docker --location=us-central1
Dgcloud artifacts repositories create my-docker-repo --repository-format=container --location=us-central1
Attempts:
2 left
💡 Hint
Remember that Docker repositories use the 'docker' format and location must match your desired region.
Architecture
intermediate
2: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?
AChoose a single-region location closest to your main office
BChoose a multi-region location that covers all your users
CCreate multiple single-region repositories in each continent
DUse a regional location but replicate images manually
Attempts:
2 left
💡 Hint
Think about how Google Cloud manages multi-region locations for global access.
security
advanced
2: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?
Aroles/storage.objectAdmin
Broles/artifactregistry.admin
Croles/artifactregistry.reader
Droles/artifactregistry.writer
Attempts:
2 left
💡 Hint
Consider the difference between read, write, and admin roles.
service_behavior
advanced
2: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?
AThe new image overwrites the old image with tag v1.0; only one image with that tag exists.
BBoth images are stored separately with the same tag v1.0 pointing to the latest image.
CArtifact Registry rejects the second push because the tag v1.0 already exists.
DThe old image is deleted and the new image is stored with a new unique tag.
Attempts:
2 left
💡 Hint
Think about how Docker tags work in registries.
Best Practice
expert
2: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?
AUse Workload Identity Federation to allow the pipeline to impersonate a service account without keys.
BUse a service account key file stored in the pipeline repository and authenticate with it.
CStore the service account password as a secret in the pipeline and use it for authentication.
DUse user credentials from a developer's account to authenticate the pipeline.
Attempts:
2 left
💡 Hint
Consider how to avoid long-lived keys and manual credential management.