Skip to content

fix: Add E3725 for FSx FileSystemType-specific StorageCapacity - #4708

Merged
kddejong merged 2 commits into
aws-cloudformation:mainfrom
kddejong:fix/issue/4706
Sep 14, 2026
Merged

kddejong merged 2 commits into
aws-cloudformation:mainfrom
kddejong:fix/issue/4706

Conversation

@kddejong

Copy link
Copy Markdown
Contributor

What

Adds rule E3725 with an if/then extension (aws_fsx_filesystem/storage_capacity.json) that validates AWS::FSx::FileSystem StorageCapacity against the correct bounds for each FileSystemType:

FileSystemType minimum maximum
WINDOWS 32 65,536
OPENZFS 64 524,288
LUSTRE 1200 (none)
ONTAP 1024 (none)

Why

Fixes #4706. The enhanced provider schema carried a single unconditional minimum: 32 / maximum: 65536 on StorageCapacity — but those are the FSx for Windows File Server SSD limits. Applied to every FileSystemType, the stale 65536 cap produced a false W1030 warning on valid Lustre PERSISTENT_2 capacities (e.g. a parameter with MaxValue: 460800).

Lustre and ONTAP have no static per-file-system maximum — the documented Lustre ceiling is an adjustable, account-level Service Quota, not a template constraint — so this rule imposes only a per-type minimum for them and no maximum. That is what makes the false warning disappear without inventing a fabricated ceiling.

The unconditional Windows-only min/max is removed in the companion schema change: aws-cloudformation/resource-provider-enhanced-schemas#37 (merged). This rule supplies the correct per-type validation that a single unconditional value cannot express.

Validation

  • New unit test test/unit/rules/resources/fsx/test_file_system_storage_capacity.py (17 cases: valid per-type min/max, the FSx Lustre max size false positive W1030 #4706 Lustre scenario, and per-type violations with exact messages).
  • ruff check, ruff format --check, isort --check clean on the new files.
  • --update-documentation regenerated docs/rules.md.
  • End-to-end against the FSx Lustre max size false positive W1030 #4706 reproducer: warning gone; E3725 fires with {value} is less than the minimum of {N} for '{FileSystemType}' file systems on genuine violations.

AWS::FSx::FileSystem StorageCapacity limits depend on FileSystemType.
Add rule E3725 with an if/then extension enforcing the correct
per-type bounds: Windows 32-65536 GiB, OpenZFS 64-524288 GiB, Lustre
minimum 1200 GiB, ONTAP minimum 1024 GiB. Lustre and ONTAP have no
static per-file-system maximum (the ceiling is an adjustable account
quota), so none is imposed.

Companion to the enhanced-schemas change that removes the stale,
unconditional Windows-only maximum of 65536 which produced false
W1030 warnings on valid Lustre capacities.

Fixes aws-cloudformation#4706
@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.67%. Comparing base (1ccc068) to head (558d0b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4708   +/-   ##
=======================================
  Coverage   94.66%   94.67%           
=======================================
  Files         434      435    +1     
  Lines       15561    15577   +16     
  Branches     3019     3019           
=======================================
+ Hits        14731    14747   +16     
  Misses        453      453           
  Partials      377      377           
Flag Coverage Δ
unittests 94.67% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add valid and below-minimum cases for the SCRATCH_1 and PERSISTENT_1
Lustre deployment types, documenting that E3725 applies the 1200 GiB
minimum to every Lustre DeploymentType (the rule keys on
FileSystemType, not DeploymentType).
@kddejong
kddejong merged commit 76dd3cc into aws-cloudformation:main Sep 14, 2026
22 checks passed
@kddejong
kddejong deleted the fix/issue/4706 branch September 14, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FSx Lustre max size false positive W1030

1 participant