Skip to content

Conversation

@Megha-Bose
Copy link
Contributor

backupdr: added support for restore compute instance and disk

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 6, 2026
@github-actions github-actions bot requested a review from trodge January 6, 2026 09:48
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

@trodge, 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.

@Megha-Bose Megha-Bose force-pushed the tf-restore branch 11 times, most recently from 4f69b66 to 3565c48 Compare January 6, 2026 15:21
@modular-magician modular-magician added service/backupdr and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 6, 2026
@modular-magician
Copy link
Collaborator

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, 1396 insertions(+))
google-beta provider: Diff ( 6 files changed, 8294 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 2362 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_backup_dr_restore_workload (10 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_backup_dr_restore_workload" "primary" {
  clear_overrides_field_mask = # value needed
  compute_instance_restore_properties {
    advanced_machine_features {
      enable_uefi_networking = # value needed
      visible_core_count     = # value needed
    }
    allocation_affinity {
      consume_allocation_type = # value needed
      key                     = # value needed
      values                  = # value needed
    }
    confidential_instance_config {
      enable_confidential_compute = # value needed
    }
    disks {
      auto_delete = # value needed
      boot        = # value needed
      device_name = # value needed
      disk_encryption_key {
        kms_key_name            = # value needed
        kms_key_service_account = # value needed
        raw_key                 = # value needed
        rsa_encrypted_key       = # value needed
      }
      disk_interface = # value needed
      disk_size_gb   = # value needed
      disk_type      = # value needed
      guest_os_feature {
        type = # value needed
      }
      index = # value needed
      initialize_params {
        disk_name     = # value needed
        replica_zones = # value needed
      }
      kind        = # value needed
      license     = # value needed
      mode        = # value needed
      saved_state = # value needed
      source      = # value needed
      type        = # value needed
    }
    display_device {
      enable_display = # value needed
    }
    guest_accelerators {
      accelerator_count = # value needed
      accelerator_type  = # value needed
    }
    hostname = # value needed
    instance_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    key_revocation_action_type = # value needed
    labels {
      key   = # value needed
      value = # value needed
    }
    min_cpu_platform = # value needed
    network_interfaces {
      access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      alias_ip_ranges {
        ip_cidr_range         = # value needed
        subnetwork_range_name = # value needed
      }
      internal_ipv6_prefix_length = # value needed
      ip_address                  = # value needed
      ipv6_access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        name                        = # value needed
        network_tier                = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      ipv6_access_type   = # value needed
      ipv6_address       = # value needed
      network_attachment = # value needed
      nic_type           = # value needed
      queue_count        = # value needed
      stack_type         = # value needed
    }
    network_performance_config {
      total_egress_bandwidth_tier = # value needed
    }
    params {
      resource_manager_tags {
        key   = # value needed
        value = # value needed
      }
    }
    private_ipv6_google_access = # value needed
    resource_policies          = # value needed
    scheduling {
      instance_termination_action = # value needed
      local_ssd_recovery_timeout {
        nanos   = # value needed
        seconds = # value needed
      }
      max_run_duration {
        nanos   = # value needed
        seconds = # value needed
      }
      min_node_cpus = # value needed
      node_affinities {
        key      = # value needed
        operator = # value needed
        values   = # value needed
      }
      termination_time = # value needed
    }
  }
  disk_restore_properties {
    access_mode  = # value needed
    architecture = # value needed
    disk_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    enable_confidential_compute = # value needed
    guest_os_feature {
      type = # value needed
    }
    labels {
      key   = # value needed
      value = # value needed
    }
    licenses                  = # value needed
    physical_block_size_bytes = # value needed
    resource_manager_tags {
      key   = # value needed
      value = # value needed
    }
    resource_policy = # value needed
    storage_pool    = # value needed
  }
  request_id = # value needed
  target_resource {
    gcp_resource {
      gcp_resourcename = # value needed
      location         = # value needed
      type             = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 16
Skipped tests: 2
Affected tests: 10

Click here to see the affected service packages
  • backupdr

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample
  • TestAccBackupDRRestoreWorkload_computeInstanceBasic
  • TestAccBackupDRRestoreWorkload_computeInstanceWithProperties
  • TestAccBackupDRRestoreWorkload_deleteInstanceFalse
  • TestAccBackupDRRestoreWorkload_diskBasic
  • TestAccBackupDRRestoreWorkload_regionalDisk

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceWithProperties [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_deleteInstanceFalse [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_diskBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_regionalDisk [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

so that if you must retry your request, the server will know to ignore
the request if it has already been completed.
# --- Target Environments (oneof target_environment) ---
- name: 'computeInstanceTargetEnvironment'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use conflicts with other 2 fields

@zli82016
Copy link
Member

zli82016 commented Jan 7, 2026

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 7, 2026
@modular-magician
Copy link
Collaborator

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, 1396 insertions(+))
google-beta provider: Diff ( 6 files changed, 8294 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 2362 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_backup_dr_restore_workload (10 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_backup_dr_restore_workload" "primary" {
  clear_overrides_field_mask = # value needed
  compute_instance_restore_properties {
    advanced_machine_features {
      enable_uefi_networking = # value needed
      visible_core_count     = # value needed
    }
    allocation_affinity {
      consume_allocation_type = # value needed
      key                     = # value needed
      values                  = # value needed
    }
    confidential_instance_config {
      enable_confidential_compute = # value needed
    }
    disks {
      auto_delete = # value needed
      boot        = # value needed
      device_name = # value needed
      disk_encryption_key {
        kms_key_name            = # value needed
        kms_key_service_account = # value needed
        raw_key                 = # value needed
        rsa_encrypted_key       = # value needed
      }
      disk_interface = # value needed
      disk_size_gb   = # value needed
      disk_type      = # value needed
      guest_os_feature {
        type = # value needed
      }
      index = # value needed
      initialize_params {
        disk_name     = # value needed
        replica_zones = # value needed
      }
      kind        = # value needed
      license     = # value needed
      mode        = # value needed
      saved_state = # value needed
      source      = # value needed
      type        = # value needed
    }
    display_device {
      enable_display = # value needed
    }
    guest_accelerators {
      accelerator_count = # value needed
      accelerator_type  = # value needed
    }
    hostname = # value needed
    instance_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    key_revocation_action_type = # value needed
    labels {
      key   = # value needed
      value = # value needed
    }
    min_cpu_platform = # value needed
    network_interfaces {
      access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      alias_ip_ranges {
        ip_cidr_range         = # value needed
        subnetwork_range_name = # value needed
      }
      internal_ipv6_prefix_length = # value needed
      ip_address                  = # value needed
      ipv6_access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        name                        = # value needed
        network_tier                = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      ipv6_access_type   = # value needed
      ipv6_address       = # value needed
      network_attachment = # value needed
      nic_type           = # value needed
      queue_count        = # value needed
      stack_type         = # value needed
    }
    network_performance_config {
      total_egress_bandwidth_tier = # value needed
    }
    params {
      resource_manager_tags {
        key   = # value needed
        value = # value needed
      }
    }
    private_ipv6_google_access = # value needed
    resource_policies          = # value needed
    scheduling {
      instance_termination_action = # value needed
      local_ssd_recovery_timeout {
        nanos   = # value needed
        seconds = # value needed
      }
      max_run_duration {
        nanos   = # value needed
        seconds = # value needed
      }
      min_node_cpus = # value needed
      node_affinities {
        key      = # value needed
        operator = # value needed
        values   = # value needed
      }
      termination_time = # value needed
    }
  }
  disk_restore_properties {
    access_mode  = # value needed
    architecture = # value needed
    disk_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    enable_confidential_compute = # value needed
    guest_os_feature {
      type = # value needed
    }
    labels {
      key   = # value needed
      value = # value needed
    }
    licenses                  = # value needed
    physical_block_size_bytes = # value needed
    resource_manager_tags {
      key   = # value needed
      value = # value needed
    }
    resource_policy = # value needed
    storage_pool    = # value needed
  }
  request_id = # value needed
  target_resource {
    gcp_resource {
      gcp_resourcename = # value needed
      location         = # value needed
      type             = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 26
Passed tests: 14
Skipped tests: 2
Affected tests: 10

Click here to see the affected service packages
  • backupdr

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample
  • TestAccBackupDRRestoreWorkload_computeInstanceBasic
  • TestAccBackupDRRestoreWorkload_computeInstanceWithProperties
  • TestAccBackupDRRestoreWorkload_deleteInstanceFalse
  • TestAccBackupDRRestoreWorkload_diskBasic
  • TestAccBackupDRRestoreWorkload_regionalDisk

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceWithProperties [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_deleteInstanceFalse [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_diskBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_regionalDisk [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Jan 8, 2026
@modular-magician
Copy link
Collaborator

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, 1396 insertions(+))
google-beta provider: Diff ( 6 files changed, 8294 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 2362 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_backup_dr_restore_workload (10 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_backup_dr_restore_workload" "primary" {
  clear_overrides_field_mask = # value needed
  compute_instance_restore_properties {
    advanced_machine_features {
      enable_uefi_networking = # value needed
      visible_core_count     = # value needed
    }
    allocation_affinity {
      consume_allocation_type = # value needed
      key                     = # value needed
      values                  = # value needed
    }
    confidential_instance_config {
      enable_confidential_compute = # value needed
    }
    disks {
      auto_delete = # value needed
      boot        = # value needed
      device_name = # value needed
      disk_encryption_key {
        kms_key_name            = # value needed
        kms_key_service_account = # value needed
        raw_key                 = # value needed
        rsa_encrypted_key       = # value needed
      }
      disk_interface = # value needed
      disk_size_gb   = # value needed
      disk_type      = # value needed
      guest_os_feature {
        type = # value needed
      }
      index = # value needed
      initialize_params {
        disk_name     = # value needed
        replica_zones = # value needed
      }
      kind        = # value needed
      license     = # value needed
      mode        = # value needed
      saved_state = # value needed
      source      = # value needed
      type        = # value needed
    }
    display_device {
      enable_display = # value needed
    }
    guest_accelerators {
      accelerator_count = # value needed
      accelerator_type  = # value needed
    }
    hostname = # value needed
    instance_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    key_revocation_action_type = # value needed
    labels {
      key   = # value needed
      value = # value needed
    }
    min_cpu_platform = # value needed
    network_interfaces {
      access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      alias_ip_ranges {
        ip_cidr_range         = # value needed
        subnetwork_range_name = # value needed
      }
      internal_ipv6_prefix_length = # value needed
      ip_address                  = # value needed
      ipv6_access_configs {
        external_ip                 = # value needed
        external_ipv6               = # value needed
        external_ipv6_prefix_length = # value needed
        name                        = # value needed
        network_tier                = # value needed
        public_ptr_domain_name      = # value needed
        set_public_ptr              = # value needed
        type                        = # value needed
      }
      ipv6_access_type   = # value needed
      ipv6_address       = # value needed
      network_attachment = # value needed
      nic_type           = # value needed
      queue_count        = # value needed
      stack_type         = # value needed
    }
    network_performance_config {
      total_egress_bandwidth_tier = # value needed
    }
    params {
      resource_manager_tags {
        key   = # value needed
        value = # value needed
      }
    }
    private_ipv6_google_access = # value needed
    resource_policies          = # value needed
    scheduling {
      instance_termination_action = # value needed
      local_ssd_recovery_timeout {
        nanos   = # value needed
        seconds = # value needed
      }
      max_run_duration {
        nanos   = # value needed
        seconds = # value needed
      }
      min_node_cpus = # value needed
      node_affinities {
        key      = # value needed
        operator = # value needed
        values   = # value needed
      }
      termination_time = # value needed
    }
  }
  disk_restore_properties {
    access_mode  = # value needed
    architecture = # value needed
    disk_encryption_key {
      kms_key_name            = # value needed
      kms_key_service_account = # value needed
      raw_key                 = # value needed
      rsa_encrypted_key       = # value needed
    }
    enable_confidential_compute = # value needed
    guest_os_feature {
      type = # value needed
    }
    labels {
      key   = # value needed
      value = # value needed
    }
    licenses                  = # value needed
    physical_block_size_bytes = # value needed
    resource_manager_tags {
      key   = # value needed
      value = # value needed
    }
    resource_policy = # value needed
    storage_pool    = # value needed
  }
  request_id = # value needed
  target_resource {
    gcp_resource {
      gcp_resourcename = # value needed
      location         = # value needed
      type             = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 27
Passed tests: 15
Skipped tests: 2
Affected tests: 10

Click here to see the affected service packages
  • backupdr

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample
  • TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample
  • TestAccBackupDRRestoreWorkload_computeInstanceBasic
  • TestAccBackupDRRestoreWorkload_computeInstanceWithProperties
  • TestAccBackupDRRestoreWorkload_deleteInstanceFalse
  • TestAccBackupDRRestoreWorkload_diskBasic
  • TestAccBackupDRRestoreWorkload_regionalDisk

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadComputeInstanceFullExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadDiskBasicExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadRegionalDiskExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_backupDrRestoreWorkloadWithoutDeleteExample [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_computeInstanceWithProperties [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_deleteInstanceFalse [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_diskBasic [Error message] [Debug log]
TestAccBackupDRRestoreWorkload_regionalDisk [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 8, 2026
@Megha-Bose
Copy link
Contributor Author

Megha-Bose commented Jan 8, 2026

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

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests service/backupdr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants