From b3083ce369ee3da3b6170f80a0fa79373e78b491 Mon Sep 17 00:00:00 2001 From: Behnam Mozafari Date: Tue, 1 Dec 2026 14:22:44 +1100 Subject: [PATCH 1/3] UID2-6791: Document Confidential Space image refresh for GCP private operators Co-Authored-By: Claude Sonnet 5.5 --- .../operator-private-gcp-confidential-space.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/guides/operator-private-gcp-confidential-space.md b/docs/guides/operator-private-gcp-confidential-space.md index 7cb820720..cd226e1d4 100644 --- a/docs/guides/operator-private-gcp-confidential-space.md +++ b/docs/guides/operator-private-gcp-confidential-space.md @@ -532,10 +532,26 @@ If you're upgrading to a new version, the upgrade process depends on the deploym If you previously deployed the Private Operator for GCP using the Terraform template, compare the latest version of the template with the one you used when you deployed. If there are changes, make sure to redeploy to include all the updates. +When you apply a version of the template that references the Confidential Space image family, the managed instance group replaces all of its VMs once, one batch at a time, without reducing capacity. Make sure your project has quota for three additional VMs of the configured machine type during the replacement. + +### Refreshing the Confidential Space image + +A VM keeps the Confidential Space image it was created with, and restarting a VM doesn't change it. Google keeps each image `STABLE` for only about six months, and UID2 accepts only operators that run a `STABLE` image. Refresh your VMs at least every 5 months, and whenever UID2 notifies you that your image is being retired. + +For the Terraform template, replace all the VMs in the managed instance group so that they're created from the latest image in the family: + +``` +gcloud compute instance-groups managed rolling-action replace {MIG_NAME} --region {REGION} +``` + +Don't use `rolling-action restart`, which keeps the existing boot disk and image. Re-running `terraform apply` doesn't refresh the image if the template hasn't changed. + ### Upgrading—gcloud CLI If you deployed using the gcloud CLI, you must manually bring up new instances that use the new `{OPERATOR_IMAGE}` and then shut down old instances. +Create the new instances with `--image-family=confidential-space` so that they use the latest Confidential Space image. Rebooting or restarting an existing instance doesn't update its image. Recreate your instances at least every 5 months; see [Refreshing the Confidential Space image](#refreshing-the-confidential-space-image). + If you previously set up a load balancer manually, you'll also need to update the mapping for the load balancer. ## Scraping metrics From 7d07d99719de68883731fa498eb55334545b7393 Mon Sep 17 00:00:00 2001 From: Behnam Mozafari Date: Wed, 2 Dec 2026 13:29:38 +1100 Subject: [PATCH 2/3] UID2-6791: Update GCP image refresh guidance to match operator PR #2876 Use the no-downtime rolling-action replace command, document min_ready_sec readiness and the post-replace Terraform plan drift, and add a note for the secret-manager version_destroy_ttl error. Co-Authored-By: Claude Opus 5.5 --- ...operator-private-gcp-confidential-space.md | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/guides/operator-private-gcp-confidential-space.md b/docs/guides/operator-private-gcp-confidential-space.md index cd226e1d4..3af870084 100644 --- a/docs/guides/operator-private-gcp-confidential-space.md +++ b/docs/guides/operator-private-gcp-confidential-space.md @@ -254,6 +254,10 @@ When you run `terraform apply`, the following file is generated in the same fold Be sure to follow the recommended practices for Terraform `state` files: they are required for maintaining the deployed infrastructure, and they might contain sensitive information. For details, see [state](https://developer.hashicorp.com/terraform/language/state) in the Terraform documentation. ::: +:::note +If `terraform init` or `terraform apply` fails with `An argument named "version_destroy_ttl" is not expected here`, you're using an earlier version of the template that pulls in an incompatible version of the `secret-manager` module. In `main.tf`, change the `secret-manager` module `version` from `"~> 0.1"` to `"0.9.0"`, and then run `terraform init` and `terraform apply` again. +::: + #### Test Terraform using the health check endpoint Call the health check endpoint to test the health of your implementation. The expected result is HTTP 200 with a response body of `OK`. @@ -532,25 +536,33 @@ If you're upgrading to a new version, the upgrade process depends on the deploym If you previously deployed the Private Operator for GCP using the Terraform template, compare the latest version of the template with the one you used when you deployed. If there are changes, make sure to redeploy to include all the updates. -When you apply a version of the template that references the Confidential Space image family, the managed instance group replaces all of its VMs once, one batch at a time, without reducing capacity. Make sure your project has quota for three additional VMs of the configured machine type during the replacement. +When you first apply a version of the template that references the Confidential Space image family, the managed instance group replaces all of its VMs once. It creates each replacement before deleting an old VM, so there's no downtime. Make sure your project has quota for three additional VMs of the configured machine type during the replacement. ### Refreshing the Confidential Space image A VM keeps the Confidential Space image it was created with, and restarting a VM doesn't change it. Google keeps each image `STABLE` for only about six months, and UID2 accepts only operators that run a `STABLE` image. Refresh your VMs at least every 5 months, and whenever UID2 notifies you that your image is being retired. -For the Terraform template, replace all the VMs in the managed instance group so that they're created from the latest image in the family: +If you deployed using the Terraform template, the instance template references the image family, so each new VM gets the newest image when it's created. VMs in the same group can therefore run different images. To move every VM to the latest image, replace all the VMs in the managed instance group, which is named `{network_name}-mig`: ``` -gcloud compute instance-groups managed rolling-action replace {MIG_NAME} --region {REGION} +gcloud compute instance-groups managed rolling-action replace {network_name}-mig --region {REGION} --max-surge 3 --max-unavailable 0 ``` -Don't use `rolling-action restart`, which keeps the existing boot disk and image. Re-running `terraform apply` doesn't refresh the image if the template hasn't changed. +`--max-unavailable 0` keeps each existing VM serving until its replacement is ready. The group has no autohealing health check, so a new VM counts as ready after it has been running for 10 minutes (the `min_ready_sec` value in the template's update policy). + +:::note +- Don't use `rolling-action restart`, which keeps the existing boot disk and image. +- Re-running `terraform apply` doesn't refresh the image, because the template doesn't change. +- After a `rolling-action replace`, the next `terraform plan` shows a change to the instance group's version name. Applying it replaces all VMs again, also without downtime, in about 10 minutes. +::: + +If you deployed using the gcloud CLI, delete and recreate your instances with `--image-family confidential-space`. For details, see [Upgrading—gcloud CLI](#upgradinggcloud-cli). ### Upgrading—gcloud CLI If you deployed using the gcloud CLI, you must manually bring up new instances that use the new `{OPERATOR_IMAGE}` and then shut down old instances. -Create the new instances with `--image-family=confidential-space` so that they use the latest Confidential Space image. Rebooting or restarting an existing instance doesn't update its image. Recreate your instances at least every 5 months; see [Refreshing the Confidential Space image](#refreshing-the-confidential-space-image). +Create the new instances with `--image-family confidential-space` so that they use the latest Confidential Space image. Rebooting or restarting an existing instance doesn't update its image. Recreate your instances at least every 5 months; see [Refreshing the Confidential Space image](#refreshing-the-confidential-space-image). If you previously set up a load balancer manually, you'll also need to update the mapping for the load balancer. From 73a731f0f72745c8293f18db392ffb6c8cc57aa2 Mon Sep 17 00:00:00 2001 From: Behnam Mozafari Date: Wed, 2 Dec 2026 13:37:41 +1100 Subject: [PATCH 3/3] UID2-6791: Simplify GCP image refresh flags explanation Co-Authored-By: Claude Opus 5.5 --- docs/guides/operator-private-gcp-confidential-space.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/operator-private-gcp-confidential-space.md b/docs/guides/operator-private-gcp-confidential-space.md index 3af870084..27115c50c 100644 --- a/docs/guides/operator-private-gcp-confidential-space.md +++ b/docs/guides/operator-private-gcp-confidential-space.md @@ -548,7 +548,7 @@ If you deployed using the Terraform template, the instance template references t gcloud compute instance-groups managed rolling-action replace {network_name}-mig --region {REGION} --max-surge 3 --max-unavailable 0 ``` -`--max-unavailable 0` keeps each existing VM serving until its replacement is ready. The group has no autohealing health check, so a new VM counts as ready after it has been running for 10 minutes (the `min_ready_sec` value in the template's update policy). +The flags keep every existing VM serving until its replacement has been running for 10 minutes, giving the new operator time to start and attest, so the refresh causes no downtime and takes about 10 minutes. Don't drop `--max-unavailable 0`: without it, gcloud can take every VM offline at once when `min_replicas` is small. :::note - Don't use `rolling-action restart`, which keeps the existing boot disk and image.