From 466fd5b350a0814212bc728d8f3f65df7c926650 Mon Sep 17 00:00:00 2001 From: Siddhartha Bagaria Date: Fri, 15 Sep 2023 21:50:44 -0700 Subject: [PATCH 1/2] Add accelerators to workstation update masks This was missed in #8490, and so in-place updates to accelerators are silently dropped. Verified the issue by updating my workstation config with accelerators but the actual config did not change. On inspecting the debug logs, I noticed the update mask was wrong. Near the end of the log, the following warning message was present. ``` 2023-09-16T04:38:23.768Z [WARN] Provider "provider[\"registry.terraform.io/hashicorp/google-beta\"]" produced an unexpected new value for google_workstations_workstation_config.sidb, but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations: - .etag: was cty.StringVal("...."), but now cty.StringVal("...") - .host[0].gce_instance[0].accelerators: block count changed from 1 to 0 ``` --- mmv1/products/workstations/WorkstationConfig.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mmv1/products/workstations/WorkstationConfig.yaml b/mmv1/products/workstations/WorkstationConfig.yaml index 4a64f9f44852..80896be2a34e 100644 --- a/mmv1/products/workstations/WorkstationConfig.yaml +++ b/mmv1/products/workstations/WorkstationConfig.yaml @@ -198,6 +198,8 @@ properties: - 'host.gceInstance.shieldedInstanceConfig.enableVtpm' - 'host.gceInstance.shieldedInstanceConfig.enableIntegrityMonitoring' - 'host.gceInstance.confidentialInstanceConfig.enableConfidentialCompute' + - 'host.gceInstance.accelerators.count' + - 'host.gceInstance.accelerators.type' properties: - !ruby/object:Api::Type::NestedObject name: 'gceInstance' From ed88176ba66f1f6c25697d6937626121fbb15e80 Mon Sep 17 00:00:00 2001 From: Siddhartha Bagaria Date: Tue, 19 Sep 2023 17:46:29 -0700 Subject: [PATCH 2/2] Fix test failure --- mmv1/products/workstations/WorkstationConfig.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mmv1/products/workstations/WorkstationConfig.yaml b/mmv1/products/workstations/WorkstationConfig.yaml index 80896be2a34e..2bf15ad17af4 100644 --- a/mmv1/products/workstations/WorkstationConfig.yaml +++ b/mmv1/products/workstations/WorkstationConfig.yaml @@ -198,8 +198,7 @@ properties: - 'host.gceInstance.shieldedInstanceConfig.enableVtpm' - 'host.gceInstance.shieldedInstanceConfig.enableIntegrityMonitoring' - 'host.gceInstance.confidentialInstanceConfig.enableConfidentialCompute' - - 'host.gceInstance.accelerators.count' - - 'host.gceInstance.accelerators.type' + - 'host.gceInstance.accelerators' properties: - !ruby/object:Api::Type::NestedObject name: 'gceInstance'