compute: Validate stopping for update in plan stage
This patch moves the allowUpdate check from the apply stage to the plan stage. Covers all configuration changes that require an instance to be stopped. It also adds new helper functions for checking network configuration changes and service account changes.
This patch is covered by existing acceptance tests: TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate
- Add new customdiff
validateStoppingForUpdate - Add new helper functions
hasServiceAccountChangedhasNetworkInterfaceChanged
- Delete
allowUpdatecheck from apply stage - Refactor scopeChange check using the new helper function in apply stage
Closes: https://github.com/hashicorp/terraform-provider-google/issues/4076
Release Note Template for Downstream PRs (will be copied)
compute: validate stopping for update in plan stage
Hello! I am a robot. Tests will require approval from a repository maintainer to run.
@ScottSuarez, 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.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 2 files changed, 90 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 90 insertions(+), 17 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 47 insertions(+))
Tests analytics
Total tests: 1036 Passed tests: 951 Skipped tests: 73 Affected tests: 12
Click here to see the affected service packages
- compute
Action taken
Found 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccComputeAttachedDisk_diskInterface
- TestAccComputeInstanceConfidentialInstanceConfigMain
- TestAccComputeInstance_confidentialHyperDiskBootDisk
- TestAccComputeInstance_machineTypeUrl
- TestAccComputeInstance_maxRunDuration_update
- TestAccComputeInstance_networkIpUpdate
- TestAccComputeInstance_noServiceAccount
- TestAccComputeInstance_serviceAccount
- TestAccComputeInstance_spotVM_maxRunDuration_update
- TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate
- TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate
- TestAccDataSourceComputeInstanceSerialPort_basic
🟢 Tests passed during RECORDING mode:
TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate[Debug log]
TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate[Debug log]
🟢 No issues found for passed tests after REPLAYING rerun.
🔴 Tests failed during RECORDING mode:
TestAccComputeAttachedDisk_diskInterface[Error message] [Debug log]
TestAccComputeInstanceConfidentialInstanceConfigMain[Error message] [Debug log]
TestAccComputeInstance_confidentialHyperDiskBootDisk[Error message] [Debug log]
TestAccComputeInstance_machineTypeUrl[Error message] [Debug log]
TestAccComputeInstance_maxRunDuration_update[Error message] [Debug log]
TestAccComputeInstance_networkIpUpdate[Error message] [Debug log]
TestAccComputeInstance_noServiceAccount[Error message] [Debug log]
TestAccComputeInstance_serviceAccount[Error message] [Debug log]
TestAccComputeInstance_spotVM_maxRunDuration_update[Error message] [Debug log]
TestAccDataSourceComputeInstanceSerialPort_basic[Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 2 files changed, 95 insertions(+), 17 deletions(-))
google-beta provider: Diff ( 2 files changed, 95 insertions(+), 17 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 47 insertions(+))
Tests analytics
Total tests: 1036 Passed tests: 959 Skipped tests: 73 Affected tests: 4
Click here to see the affected service packages
- compute
Action taken
Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccComputeInstance_machineTypeUrl
- TestAccComputeInstance_maxRunDuration_update
- TestAccComputeInstance_noServiceAccount
- TestAccComputeInstance_serviceAccount
🔴 Tests failed during RECORDING mode:
TestAccComputeInstance_machineTypeUrl[Error message] [Debug log]
TestAccComputeInstance_maxRunDuration_update[Error message] [Debug log]
TestAccComputeInstance_noServiceAccount[Error message] [Debug log]
TestAccComputeInstance_serviceAccount[Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
@GoogleCloudPlatform/terraform-team @ScottSuarez This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 3 files changed, 102 insertions(+), 19 deletions(-))
google-beta provider: Diff ( 3 files changed, 102 insertions(+), 19 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 47 insertions(+))
Tests analytics
Total tests: 1040 Passed tests: 958 Skipped tests: 73 Affected tests: 9
Click here to see the affected service packages
- compute
Action taken
Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
- TestAccComputeInstanceConfidentialInstanceConfigMain
- TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain
- TestAccComputeInstance_confidentialHyperDiskBootDisk
- TestAccComputeInstance_maxRunDuration_update
- TestAccComputeInstance_networkIpUpdate
- TestAccComputeInstance_spotVM_maxRunDuration_update
- TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate
- TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate
- TestAccDataSourceComputeInstanceSerialPort_basic
🟢 Tests passed during RECORDING mode:
TestAccComputeInstance_maxRunDuration_update [Debug log]
TestAccComputeInstance_updateRunning_desiredStatusNotSet_notAllowStoppingForUpdate [Debug log]
TestAccComputeInstance_updateRunning_desiredStatusRunning_notAllowStoppingForUpdate [Debug log]
🟢 No issues found for passed tests after REPLAYING rerun.
🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceConfidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeInstance_confidentialHyperDiskBootDisk [Error message] [Debug log]
TestAccComputeInstance_networkIpUpdate [Error message] [Debug log]
TestAccComputeInstance_spotVM_maxRunDuration_update [Error message] [Debug log]
TestAccDataSourceComputeInstanceSerialPort_basic [Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
@ScottSuarez This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 3 files changed, 173 insertions(+), 19 deletions(-))
google-beta provider: Diff ( 3 files changed, 173 insertions(+), 19 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 81 insertions(+))
Tests analytics
Total tests: 648 Passed tests: 586 Skipped tests: 61 Affected tests: 1
Click here to see the affected service packages
- compute
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_serviceAccount_updated0to1to0scopes
🔴 Tests failed during RECORDING mode:
TestAccComputeInstance_serviceAccount_updated0to1to0scopes [Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
@GoogleCloudPlatform/terraform-team @ScottSuarez This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 3 files changed, 176 insertions(+), 19 deletions(-))
google-beta provider: Diff ( 3 files changed, 176 insertions(+), 19 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 84 insertions(+))
Tests analytics
Total tests: 426 Passed tests: 365 Skipped tests: 61 Affected tests: 0
Click here to see the affected service packages
- compute
🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.
View the build log
@GoogleCloudPlatform/terraform-team @ScottSuarez This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.
/gcbrun
Hi there, I'm the Modular magician. I've detected the following information about your changes:
Diff report
Your PR generated some diffs in downstreams - here they are.
google provider: Diff ( 3 files changed, 176 insertions(+), 19 deletions(-))
google-beta provider: Diff ( 3 files changed, 176 insertions(+), 19 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 84 insertions(+))
Tests analytics
Total tests: 710 Passed tests: 639 Skipped tests: 70 Affected tests: 1
Click here to see the affected service packages
- compute
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
- TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy [Error message] [Debug log]
🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.
@Asiderr, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.
Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

This notification can be disabled with the disable-automatic-closure label.
@Asiderr, this PR is waiting for action from you. If no action is taken, this PR will be closed in 14 days.
Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

This notification can be disabled with the disable-automatic-closure label.
@Asiderr, this PR is waiting for action from you. If no action is taken, this PR will be closed in 2 weekdays.
Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

This notification can be disabled with the disable-automatic-closure label.
@Asiderr, this PR is being closed due to inactivity.