Skip to content

[Dataproc] Add instance_flexibility_policy to worker_config in google_dataproc_workflow_template - #18946

Open
realdev12 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
realdev12:dataproc-flex-vm-worker
Open

realdev12 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
realdev12:dataproc-flex-vm-worker

Conversation

@realdev12

Copy link
Copy Markdown
Contributor

Purpose

Add support for Dataproc Flexible VMs (instance_flexibility_policy) to worker_config in google_dataproc_workflow_template. This enables workflow templates to define primary worker pools with flexible VM shapes, instance selection lists with priority ranks, and disk configurations.

Implementation Scope & Design Decisions

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

  1. Worker pool flexibility: Implements instance_flexibility_policy on worker_config with instance_selection_list (priority ranking, machine types, custom disk configs) and instance_selection_results.
  2. 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.
  3. PR Stacking: This is PR 1 of 3 for Dataproc Workflow Template Flexible VM support. PR 2 will add master_config, and PR 3 will add secondary_worker_config.

Tests & Verification

  • Generated code for both beta and ga providers.
  • Verified compilation in both downstream providers with 0 errors.
  • Added acceptance test TestAccDataprocWorkflowTemplate_instanceFlexibilityPolicy exercising worker_config.instance_flexibility_policy with multiple machine selections, ranking, and disk configuration.
dataproc: added `instance_flexibility_policy` to `worker_config` in `google_dataproc_workflow_template`

@github-actions
github-actions Bot requested a review from roaks3 September 10, 2026 13:49
@github-actions

Copy link
Copy Markdown

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

@roaks3, 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 4efa86f:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 6 files changed, 1085 insertions(+), 33 deletions(-)
google-beta provider View Diff 6 files changed, 1085 insertions(+), 33 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 {
        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.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, @roaks3 VCR tests complete for 4efa86f!

@SirGitsalot
SirGitsalot requested review from SirGitsalot and removed request for roaks3 September 10, 2026 19:30
@github-actions

Copy link
Copy Markdown

@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions

Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @roaks3 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

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