Skip to content

Add RDS DBCluster MasterUsername validation#4425

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/issue/4070
Mar 26, 2026
Merged

Add RDS DBCluster MasterUsername validation#4425
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:fix/issue/4070

Conversation

@kddejong
Copy link
Copy Markdown
Contributor

Summary

  • MasterUsername required when MasterUserPassword is specified (dependentRequired)
  • Block rdsadmin on all engines (reserved by RDS)
  • Block admin on aurora-postgresql/postgresql engines (reserved by engine)

All constraints verified against real CloudFormation deployments:

  • admin on aurora-postgresql → fails (reserved word used by the engine)
  • admin on aurora-mysql → succeeds (not reserved)
  • rdsadmin on both engines → fails
  • postgres on aurora-postgresql → succeeds (not reserved)

Fixes #4070

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.40%. Comparing base (0bbabc9) to head (5e91f91).
⚠️ Report is 50 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4425      +/-   ##
==========================================
- Coverage   93.54%   93.40%   -0.14%     
==========================================
  Files         418      434      +16     
  Lines       14145    14625     +480     
  Branches     2817     2874      +57     
==========================================
+ Hits        13232    13661     +429     
- Misses        567      594      +27     
- Partials      346      370      +24     
Flag Coverage Δ
unittests 93.40% <ø> (-0.13%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@kddejong kddejong force-pushed the fix/issue/4070 branch 3 times, most recently from e2dd504 to 97714ce Compare March 26, 2026 19:29
- MasterUsername required when MasterUserPassword is specified
- Block 'rdsadmin' on all engines (reserved by RDS)
- Block 'admin' on aurora-postgresql/postgresql (reserved by engine)

All constraints verified against real CloudFormation deployments.

Fixes aws-cloudformation#4070
@kddejong kddejong merged commit 9129769 into aws-cloudformation:main Mar 26, 2026
19 checks passed
@kddejong kddejong deleted the fix/issue/4070 branch March 26, 2026 20:06
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.

New RDS DBCluster rules

1 participant