Skip to content

[Dataproc] Add instance_flexibility_policy to google_dataproc_workflow_template - #18944

Open
realdev12 wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
realdev12:dataproc-workflow-template-flex-vm
Open

[Dataproc] Add instance_flexibility_policy to google_dataproc_workflow_template#18944
realdev12 wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
realdev12:dataproc-workflow-template-flex-vm

Conversation

@realdev12

@realdev12 realdev12 commented Sep 10, 2026

Copy link
Copy Markdown

b/559176576

Purpose

Add support for Dataproc Flexible VMs (instance_flexibility_policy) to google_dataproc_workflow_template. This enables workflow templates to define cluster placements with flexible VM shapes, instance selection lists with priority ranks, disk configurations, and provisioning model mixes (Standard vs. Spot VMs).

Implementation Scope & Design Decisions

To maintain parity with the existing google_dataproc_cluster resource and keep this PR reviewable and well-scoped:

  1. Node group configuration: Flexible VM support for node group configs is intentionally omitted since it is not yet implemented in google_dataproc_cluster.
  2. provisioning_model_mix: Configured exclusively under secondary_worker_config, adhering to Dataproc API requirements where provisioning model mixing applies only to secondary/preemptible workers.
  3. disk_config scope: Restricted to core disk properties (boot_disk_type, boot_disk_size_gb, num_local_ssds) to avoid unnecessary schema complexity while fully covering primary use cases.

Tests & Verification

  • Generated code for both beta and ga providers.
  • Verified compilation with -tags=acctest in both downstream providers with 0 errors.
  • Added comprehensive acceptance test TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy exercising instance_flexibility_policy across all three instance groups (master_config, worker_config, and secondary_worker_config), multiple ranks, multi-machine selections, nested disk_config, and provisioning_model_mix.
dataproc: added `instance_flexibility_policy` to `master_config`, `worker_config`, and `secondary_worker_config` in `google_dataproc_workflow_template`

@github-actions
github-actions Bot requested a review from melinath September 10, 2026 09:56
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

@SirGitsalot, 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 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 6 files changed, 4746 insertions(+), 1572 deletions(-)
google-beta provider View Diff 6 files changed, 4769 insertions(+), 1595 deletions(-)

Missing test report

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

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

resource "google_dataproc_workflow_template" "primary" {
  placement {
    managed_cluster {
      config {
        secondary_worker_config {
          disk_config {
            boot_disk_size_gb = # value needed
            boot_disk_type    = # value needed
          }
        }
        worker_config {
          disk_config {
            boot_disk_type = # value needed
          }
        }
      }
    }
  }
}

Missing doc report (experimental)

The following resources have fields missing in documents.

  • google_dataproc_workflow_template
    • Expected Document Path: /website/docs/r/dataproc_workflow_template.html.markdown
    • Fields: [placement.managed_cluster.config.master_config.instance_flexibility_policy placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_machine_types placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_size_gb placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_type placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.disk_config.num_local_ssds placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.machine_types placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_list.rank placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_results placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_results.machine_type placement.managed_cluster.config.master_config.instance_flexibility_policy.instance_selection_results.vm_count placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_machine_types placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_size_gb placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_type placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.disk_config.num_local_ssds placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.machine_types placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_list.rank placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_results placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_results.machine_type placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.instance_selection_results.vm_count placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.provisioning_model_mix placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.provisioning_model_mix.standard_capacity_base placement.managed_cluster.config.secondary_worker_config.instance_flexibility_policy.provisioning_model_mix.standard_capacity_percent_above_base placement.managed_cluster.config.worker_config.instance_flexibility_policy placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_machine_types placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_size_gb placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.boot_disk_type placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.disk_config.num_local_ssds placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.machine_types placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_list.rank placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_results placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_results.machine_type placement.managed_cluster.config.worker_config.instance_flexibility_policy.instance_selection_results.vm_count]

Test report

Analytics

Total Tests Passed Skipped Affected
93 86 6 1
Affected Service Packages
  • dataproc

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
  • TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

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

@realdev12, @melinath VCR tests complete for 355d81c!

@realdev12
realdev12 force-pushed the dataproc-workflow-template-flex-vm branch from 355d81c to 6081500 Compare September 10, 2026 12:02
@modular-magician

modular-magician commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 6 files changed, 4762 insertions(+), 1583 deletions(-)
google-beta provider View Diff 6 files changed, 4785 insertions(+), 1606 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
93 85 6 2
Affected Service Packages
  • dataproc

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

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

Click here to see the affected tests
  • TestAccDataprocWorkflowTemplate_basic
  • TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDataprocWorkflowTemplate_basic
❌ Error · Log - TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

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

@realdev12, @melinath VCR tests complete for 6081500!

…x to secondary_worker_config in google_dataproc_workflow_template
@realdev12
realdev12 force-pushed the dataproc-workflow-template-flex-vm branch from 6081500 to 9129add Compare September 10, 2026 13:15
@modular-magician

modular-magician commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 6 files changed, 4769 insertions(+), 1583 deletions(-)
google-beta provider View Diff 6 files changed, 4792 insertions(+), 1606 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
93 86 6 1
Affected Service Packages
  • dataproc

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
  • TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy

🟢 All tests passed!

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

@realdev12, @melinath VCR tests complete for 9129add!

@melinath

Copy link
Copy Markdown
Member

@modular-magician reassign-reviewer @SirGitsalot

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.

3 participants