Skip to content

Fix GCE instance update issue where initializeParams is sent for exis…#17972

Open
mskrynnik wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
mskrynnik:b509846156-fix-gce-instance-update-initialize-params
Open

Fix GCE instance update issue where initializeParams is sent for exis…#17972
mskrynnik wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
mskrynnik:b509846156-fix-gce-instance-update-initialize-params

Conversation

@mskrynnik

@mskrynnik mskrynnik commented Jun 16, 2026

Copy link
Copy Markdown

Fixes validation errors during google_compute_instance updates for VMs using hyperdisk-balanced boot disks.

Problem Description

When performing updates on a google_compute_instance, the provider performs a GET-modify-PUT flow. The GCE API returns initializeParams in its GET responses for existing attached disks under certain conditions. When this payload is sent back during instances.update PUT requests, GCE's backend validator parses initializeParams as a disk creation/modification action, failing with:
Provisioned IOPS cannot be specified with disk type pd-balanced

Solution

This PR strips the initializeParams block from all disks in the instance map (instMap) prior to sending GCE instances.update PUT requests. Since initializeParams is input-only and cannot be updated on existing disks, removing it is safe and backward compatible.

Verification

Modified TestAccComputeInstance_hyperdiskBootDisk_provisioned_iops_throughput to include an update step (description change), and verified that it builds and passes successfully.
Resolves: b/509846156

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: fixed a validation error on `google_compute_instance` (`Provisioned IOPS cannot be specified with disk type pd-balanced`) that occurred during updates on instances with Hyperdisk Balanced boot disks.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 16, 2026
@github-actions github-actions Bot requested a review from shuyama1 June 16, 2026 08:10
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@shuyama1, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added service/compute-instances and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jun 16, 2026
@modular-magician

modular-magician commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 4a2b413:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 53 insertions(+)
google-beta provider View Diff 3 files changed, 55 insertions(+)
terraform-google-conversion View Diff 2 files changed, 20 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
1474 1380 93 1
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeInstance_hyperdiskBootDisk_provisioned_iops_throughput

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeInstance_hyperdiskBootDisk_provisioned_iops_throughput

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@mskrynnik, @shuyama1 VCR tests complete for 4a2b413!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants