Complete the code to create a managed instance group with automatic healing.
gcloud compute instance-groups managed create my-group --base-instance-name my-instance --size [1] --template my-template --zone us-central1-aThe size parameter sets the number of instances. Setting it to 1 ensures at least one instance is running for reliability.
Complete the code to enable health checks for the instance group.
gcloud compute instance-groups managed set-autohealing --instance-group my-group --health-check [1] --initial-delay 300 --zone us-central1-a
The health check name must match the existing health check resource to enable autohealing.
Fix the error in the command to create a regional managed instance group.
gcloud compute instance-groups managed create my-regional-group --base-instance-name my-instance --size 2 --template my-template --region [1]
Regional instance groups require a region, not a zone. 'us-central1' is a region, while 'us-central1-a' is a zone.
Fill both blanks to configure a Cloud Storage bucket with versioning and lifecycle rule.
gsutil mb -l [1] gs://my-bucket/ gsutil versioning set on gs://my-bucket/ gsutil lifecycle set [2] gs://my-bucket
The bucket location is set to 'us-central1' for low latency. The lifecycle JSON deletes objects older than 30 days to manage storage costs.
Fill all three blanks to create a Pub/Sub subscription with message retention and dead-letter topic.
gcloud pubsub subscriptions create my-subscription --topic my-topic --message-retention-duration=[1] --dead-letter-topic=[2] --max-delivery-attempts=[3]
Message retention is set to 24 hours to keep messages available. The dead-letter topic is specified by its full path. Max delivery attempts is 5 to limit retries.