Skip to content

ROSAENG-59425 | feat: add worker disk size support#158

Merged
openshift-merge-bot[bot] merged 1 commit into
terraform-redhat:mainfrom
luis-falcon:ROSAENG-59425-add-worder-disk-size-support
Jun 12, 2026
Merged

ROSAENG-59425 | feat: add worker disk size support#158
openshift-merge-bot[bot] merged 1 commit into
terraform-redhat:mainfrom
luis-falcon:ROSAENG-59425-add-worder-disk-size-support

Conversation

@luis-falcon

@luis-falcon luis-falcon commented Jun 10, 2026

Copy link
Copy Markdown
Contributor
  1. the problem:
    Customer has requirements from IBM to have at least 300Gb of storage for IBM Maximo Application Suite.

They're deploying Openshift on AWS Platform using ROSA HCP.

They would like to increase the worker node root disk size beyond the default 300 GiB. The ROSA HCP documentation mentions support for machine pool disk sizing (for example via --worker-disk-size), but we have not been able to find a way to configure this when using the official Terraform module.

The underlying provider supports it since version 1.6.5 https://github.com/terraform-redhat/terraform-provider-rhcs/blob/main/CHANGELOG.md

But the module does not have a variable that allows this option to be passed.

  1. why this change is needed,
    To be able to choose disk size for default worker nodepool at creation time. Rosa cli supports already this with the (--worker-disk-size) flag.

  2. what changed,
    Only added variables needed for this feature to be enables and be passed to the underlying provider (https://github.com/terraform-redhat/terraform-provider-rhcs)

  3. how you validated it.
    I have made the terraform init and terraform validate. I crated a terraform main.tf using the documentation found in https://docs.redhat.com/en/documentation/red_hat_openshift_service_on_aws/4/html/install_clusters/creating-a-red-hat-openshift-service-on-aws-cluster-with-terraform and adding the new parameter as a variable like so :

module "rosa-hcp" { source = "terraform-redhat/rosa-hcp/rhcs" version = "1.6.3" cluster_name = local.cluster_name openshift_version = var.openshift_version account_role_prefix = local.cluster_name operator_role_prefix = local.cluster_name replicas = local.worker_node_replicas aws_availability_zones = local.region_azs ... worker_disk_size. = 400

I deployed a full cluster and verified the nodepools were the correct disk size passed during creation .

Commit format requirement:
[JIRA-TICKET] | [TYPE]:
TYPE must be one of:
feat, fix, docs, style, refactor, test, chore, build, ci, perf
For details, see: ./CONTRIBUTING.md
-->

Summary by CodeRabbit

  • New Features

    • Configurable worker node root disk size (GiB) for the default worker machine pool; leaving it unset uses the platform default.
    • Input validated to require a positive whole number when specified, with a clear error message.
  • Tests

    • Added plan-mode tests confirming passthrough behavior for both unset and numeric disk-size values.

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

Hi @luis-falcon. Thanks for your PR.

I'm waiting for a terraform-redhat member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a572e5eb-f1ed-46a9-89f7-05651f928b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 7832f6a and 3039d40.

📒 Files selected for processing (7)
  • README.md
  • main.tf
  • modules/rosa-cluster-hcp/README.md
  • modules/rosa-cluster-hcp/main.tf
  • modules/rosa-cluster-hcp/tests/rosa_cluster_hcp.tftest.hcl
  • modules/rosa-cluster-hcp/variables.tf
  • variables.tf
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • main.tf
  • variables.tf
  • modules/rosa-cluster-hcp/main.tf
  • modules/rosa-cluster-hcp/variables.tf

Walkthrough

Adds a nullable worker_disk_size input at root and module levels, wires it through the rosa_cluster_hcp module to set rhcs_cluster_rosa_hcp.rosa_hcp_cluster.worker_disk_size, and adds plan-mode tests and README entries documenting the variable.

Changes

Worker disk size parameter configuration

Layer / File(s) Summary
Worker disk size parameter passthrough
variables.tf, modules/rosa-cluster-hcp/variables.tf, main.tf, modules/rosa-cluster-hcp/main.tf, modules/rosa-cluster-hcp/tests/rosa_cluster_hcp.tftest.hcl, modules/rosa-cluster-hcp/README.md, README.md
Root and module-level variables define worker_disk_size (number type, nullable default) and wire the parameter through the module call to the rhcs_cluster_rosa_hcp resource worker_disk_size property. Tests added validate null passthrough and an explicit 400 value.
sequenceDiagram
  participant Root as Root Terraform config
  participant Module as module.rosa_cluster_hcp
  participant Resource as rhcs_cluster_rosa_hcp.rosa_hcp_cluster
  Root->>Module: pass worker_disk_size = var.worker_disk_size
  Module->>Resource: set worker_disk_size = var.worker_disk_size
Loading

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels: lgtm

Suggested reviewers:

  • gdbranco
  • olucasfreitas
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding worker disk size support as a feature.
Description check ✅ Passed The description addresses the problem, rationale, changes made, and validation, though it lacks some template sections like formal Type of Change checkbox and Breaking Changes declaration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Pr Checklist Claims Vs Evidence (Generic) ✅ Passed PR description/body contains no markdown checklist items (- [ ] / - [x]); web page search found no matches for - [ ] and no checklist lines to verify.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/rosa-cluster-hcp/main.tf`:
- Line 76: Add module tests to modules/rosa-cluster-hcp/tests/*.tftest.hcl to
cover the worker_disk_size passthrough in both set and unset paths: create one
test case where worker_disk_size = null (to assert the module omits the value or
uses the platform default) and a second test case where worker_disk_size = 400
(to assert the module forwards the explicit value into the child
module/variable). Use the existing test harness/mocks used by other tests in the
directory to instantiate the module, assert the rendered configuration contains
the expected behavior for the worker_disk_size attribute, and name the tests
clearly (e.g., worker_disk_size_null and worker_disk_size_explicit).

In `@modules/rosa-cluster-hcp/variables.tf`:
- Around line 316-320: Add a validation block to the variable "worker_disk_size"
that only allows null or whole positive GiB values: require var.worker_disk_size
== null || (var.worker_disk_size >= 1 && floor(var.worker_disk_size) ==
var.worker_disk_size). Update the variable "worker_disk_size" declaration to
include a validation { condition = ... error_message = "worker_disk_size must be
null or a whole positive integer (GiB)." } so fractional or negative inputs are
rejected at module input validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c40bccdf-ffd3-489f-aa8e-139299ed00f2

📥 Commits

Reviewing files that changed from the base of the PR and between 0860fe7 and b8fcfe0.

📒 Files selected for processing (4)
  • main.tf
  • modules/rosa-cluster-hcp/main.tf
  • modules/rosa-cluster-hcp/variables.tf
  • variables.tf

Comment thread modules/rosa-cluster-hcp/main.tf
Comment thread modules/rosa-cluster-hcp/variables.tf
@luis-falcon luis-falcon changed the title ROSAENG-59425 feat: add worder disk size support ROSAENG-59425 feat: add worker disk size support Jun 10, 2026
@luis-falcon luis-falcon force-pushed the ROSAENG-59425-add-worder-disk-size-support branch 3 times, most recently from 06e5406 to 5a78a9b Compare June 10, 2026 19:02
@luis-falcon

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@olucasfreitas

Copy link
Copy Markdown
Contributor

/ok-to-test

Comment thread variables.tf Outdated
@luis-falcon luis-falcon force-pushed the ROSAENG-59425-add-worder-disk-size-support branch from 5a78a9b to 7832f6a Compare June 11, 2026 18:31

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
modules/rosa-cluster-hcp/variables.tf (1)

316-320: ⚡ Quick win

Consider enriching the description to match the root variable's clarity.

The root variables.tf provides a more helpful description: "Default worker machine pool root disk size in GiB (e.g., 300, 400, 500). Leave null to use platform default." The module's description could benefit from similar detail about the null behavior and example values to improve the user experience at this public module boundary.

📝 Suggested enhancement
 variable "worker_disk_size" {
   type        = number
   default     = null
-  description = "Worker node root disk size in GiB."
+  description = "Worker node root disk size in GiB (e.g., 300, 400, 500). Leave null to use platform default."

   validation {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/rosa-cluster-hcp/variables.tf` around lines 316 - 320, Update the
variable "worker_disk_size" description to match the clarity of the root module:
state that it is the default worker machine pool root disk size in GiB, show
example values (e.g., 300, 400, 500), and explicitly mention that setting it to
null will use the platform default; modify the description string in the
variable "worker_disk_size" block accordingly so callers at the module boundary
get the same guidance as the root variables.tf.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@modules/rosa-cluster-hcp/variables.tf`:
- Around line 316-320: Update the variable "worker_disk_size" description to
match the clarity of the root module: state that it is the default worker
machine pool root disk size in GiB, show example values (e.g., 300, 400, 500),
and explicitly mention that setting it to null will use the platform default;
modify the description string in the variable "worker_disk_size" block
accordingly so callers at the module boundary get the same guidance as the root
variables.tf.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 078fe8d2-7f73-4268-8419-e6e2003e7dde

📥 Commits

Reviewing files that changed from the base of the PR and between 5a78a9b and 7832f6a.

📒 Files selected for processing (5)
  • main.tf
  • modules/rosa-cluster-hcp/main.tf
  • modules/rosa-cluster-hcp/tests/rosa_cluster_hcp.tftest.hcl
  • modules/rosa-cluster-hcp/variables.tf
  • variables.tf
🚧 Files skipped from review as they are similar to previous changes (2)
  • modules/rosa-cluster-hcp/tests/rosa_cluster_hcp.tftest.hcl
  • modules/rosa-cluster-hcp/main.tf

@luis-falcon luis-falcon force-pushed the ROSAENG-59425-add-worder-disk-size-support branch from 7832f6a to a871ea4 Compare June 11, 2026 18:53
@amandahla

Copy link
Copy Markdown
Member

/approve
/lgtm

@luis-falcon luis-falcon force-pushed the ROSAENG-59425-add-worder-disk-size-support branch from a871ea4 to 34413a2 Compare June 11, 2026 19:00
@openshift-ci openshift-ci Bot removed the lgtm label Jun 11, 2026
@luis-falcon luis-falcon changed the title ROSAENG-59425 feat: add worker disk size support ROSAENG-59425 | feat: add worker disk size support Jun 11, 2026
@amandahla

Copy link
Copy Markdown
Member

/ok-to-test
/approve
/lgtm

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amandahla, luis-falcon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: lfalconm <lfalconm@redhat.com>
@luis-falcon luis-falcon force-pushed the ROSAENG-59425-add-worder-disk-size-support branch from 34413a2 to 3039d40 Compare June 12, 2026 12:58
@openshift-ci openshift-ci Bot removed the lgtm label Jun 12, 2026
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@amandahla: Overrode contexts on behalf of amandahla: ci/prow/rosa-hcp-private, ci/prow/rosa-hcp-public

Details

In response to this:

/override ci/prow/rosa-hcp-public
/override ci/prow/rosa-hcp-private

Failued due VPC error while destroying/clean up
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/terraform-redhat_terraform-rhcs-rosa-hcp/158/pull-ci-terraform-redhat-terraform-rhcs-rosa-hcp-main-rosa-hcp-public/2065418496505810944
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/terraform-redhat_terraform-rhcs-rosa-hcp/158/pull-ci-terraform-redhat-terraform-rhcs-rosa-hcp-main-rosa-hcp-private/2065418493141979136

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@amandahla

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jun 12, 2026
@amandahla

Copy link
Copy Markdown
Member

/ok-to-test

@amandahla

Copy link
Copy Markdown
Member

/override ci/prow/rosa-hcp-public
/override ci/prow/rosa-hcp-private

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@amandahla: Overrode contexts on behalf of amandahla: ci/prow/rosa-hcp-private, ci/prow/rosa-hcp-public

Details

In response to this:

/override ci/prow/rosa-hcp-public
/override ci/prow/rosa-hcp-private

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@amandahla

Copy link
Copy Markdown
Member

/check-required-labels

@openshift-merge-bot openshift-merge-bot Bot merged commit ad256db into terraform-redhat:main Jun 12, 2026
12 checks passed
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