fix(docdb): allow unresolved subnet lists in database clusters#38345
fix(docdb): allow unresolved subnet lists in database clusters#38345fukunaga-kengo wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request: This change only adds a Token.isUnresolved() guard to a synthesis-time subnet-count validation. The regression is fully covered by a unit test that verifies the exact Fn::Split/Fn::ImportValue expression is preserved in AWS::DocDB::DBSubnetGroup.SubnetIds. It introduces no new resource, property, or deployment behavior, and all existing DocumentDB integration snapshots remain unchanged. |
Issue # (if applicable)
Closes #14262.
Reason for this change
DatabaseClusterchecks the number of selected subnet IDs during synthesis. An unresolved list, such asFn::Splitover an imported value, is represented by a one-element token marker and is therefore incorrectly rejected as a single-subnet configuration.Description of changes
Fn::Split/Fn::ImportValueexpression is passed toAWS::DocDB::DBSubnetGroup.SubnetIds.This change is backward-compatible. It does not change public APIs, construct IDs, feature flags, or templates for inputs that already synthesize successfully. It only allows deploy-time subnet lists that were previously rejected during synthesis.
Describe any new or updated permissions being added
No new or updated permissions are added.
Description of how you validated changes
Fn::Split/Fn::ImportValuesubnet list. The test failed with the reported error before the fix and passes after it. The targeted suite passes with 62 tests, and theaws-docdbmodule suite passes with 4 suites and 80 tests.aws-cdk-libbuild,aws-cdk-liblint,framework-integlint, TypeScript--noEmitcheck, andgit diff --checkpass.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
Additional Context
Related Issues
Dependencies
No dependency changes.
Documentation Updates
No README or API documentation update is required. This bug fix changes only synthesis-time handling of an existing input form; it introduces no public API, configuration option, or usage pattern, and it does not correct an inaccurate README example. Rosetta validation is therefore not applicable.
Follow-up Work
None identified.
Review Guidelines
Focus Areas
Token.isUnresolved(subnetIds)guards only the count validation.AWS::DocDB::DBSubnetGroup.SubnetIds.Testing Notes
The regression test asserts the exact
Fn::SplitandFn::ImportValuestructure instead of using a broad matcher.Risk Assessment
Risk is low. Existing synthesizable applications retain their current templates, and the DocumentDB two-Availability-Zone requirement is unchanged. The only newly accepted path defers validation of an unresolved list to CloudFormation and the service.