feat(aws): storage.rds DatabaseCluster + Aurora Serverless v2 + metric augmentations [stacked on #147] - #148
Open
so0k wants to merge 2 commits into
Open
feat(aws): storage.rds DatabaseCluster + Aurora Serverless v2 + metric augmentations [stacked on #147]#148so0k wants to merge 2 commits into
so0k wants to merge 2 commits into
Conversation
…c augmentations at v2.263.0 RDS PR 2d: cluster.ts/cluster-ref.ts (DatabaseCluster, DatabaseClusterFromSnapshot), aurora-cluster-instance.ts (ClusterInstance.provisioned/serverlessV2, explicit aws_rds_cluster_instance writer/readers with promotion tiers), and rds-augmentations.generated.ts from the real spec2cdk generate phase (declare-module metric*() on IDatabaseCluster/IDatabaseInstance, side-effect import in index.ts). serverlessv2_scaling_configuration applied via addOverride AFTER instances are known (block-typed args never resolve Lazy tokens — cdktn limitation, documented incl. the late-bind consequence). House patterns mirrored from instance.ts: generated-password double-freeze, removalPolicy → skipFinalSnapshot/finalSnapshotIdentifier/deletionProtection + synth warning, attach() with dbClusterIdentifier + number port, gridUUID-scoped identifiers (cluster + instances). 635 rds tests.
… + late-bind consequence note Live-verified: serverlessv2_scaling_configuration 0.5-1.0 ACU read back from AWS (addOverride block-emission design), Data API on, db.serverless writer, attached secret merges dbClusterIdentifier + number port, drift oracle clean, 13/13 destroyed. PASS 1205.95s. Fixture pins aurora-postgresql 16.8 — AWS retired 16.4 (upstream v2.263.0 table still carries it; availability is a temporal AWS property, cross-check describe-db-engine-versions when picking fixture versions).
Contributor
Author
Live apply/verify/destroy receipts —
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Storage slice PR 5/N —
storage.rdsDatabaseCluster + Aurora Serverless v2 + metric augmentations (v2.263.0)Stacked on #147. Lands
cluster.ts/cluster-ref.ts(DatabaseCluster, DatabaseClusterFromSnapshot),aurora-cluster-instance.ts(ClusterInstance.provisioned()/serverlessV2()— explicitaws_rds_cluster_instancewriter/readers with promotion tiers, replacing upstream's implicit-writer model at the resource level while keeping the same API), andrds-augmentations.generated.ts— the deferred metric mixin, produced by aws-cdk's real generate phase (in-repo spec2cdk @ v2.263.0,@aws-cdk/aws-service-spec@0.1.193; surface diffs clean vs the published bundle), wired as a side-effect import per the sqs/sns/ec2/lambda precedent. 635 rds-suite tests green (the 6,437-line upstreamcluster.test.tsported in full).Aurora Serverless v2 (the headline)
writer: ClusterInstance.serverlessV2(...)+serverlessV2MinCapacity/MaxCapacity(/AutoPauseDuration) →serverlessv2_scaling_configuration. One deep cdktn finding here: block-typed L1 arguments never resolveLazytokens (the generatedComplexObject/internalValuewrapper bypasses whole-tree token resolution — verified against the provider codegen; scalar args likeenable_http_endpointresolve fine). The block is therefore applied viaaddOverrideafter instances are created, whenhasServerlessInstanceis definitively known. Documented consequence: an instance bound via the publicbind()API after construction won't contribute the scaling block (upstream's synth-timeLazy.anywould catch it) — bind viawriter/readersprops, or use the escape hatch.This is the third instance of the block-typed-Lazy cdktn footgun this pipeline has hit (batch
retry_strategy, now serverless-v2 scaling) — prepare-time/post-hoc emission is the house pattern.Other design points
master_password+ secret version under accumulatedignore_changes— regression-tested this time), removalPolicy →skipFinalSnapshot/finalSnapshotIdentifier/deletionProtection+ synth warning,attach()mergingdbClusterIdentifier/engine/host/number-port/dbname, gridUUID-scoped identifiers for cluster and instances,enableDataApi→enable_http_endpoint.instancePropsmigration path stays template-neutral: the gridUUID name default is deliberately skipped forisFromLegacyInstancePropsinstances (documented) so migrating an unnamed legacy cluster doesn't force instance replacement.Live integ (
make rds.cluster) — receipts in threadReal Aurora PostgreSQL 16.8 Serverless v2 cluster: scaling config 0.5–1.0 ACU read back from AWS (proving the addOverride emission), Data API enabled,
db.serverlesswriter, attached secret withdbClusterIdentifier, zero-drift plan, 13/13 clean destroy. PASS 1205.95s. Run 1 was an AWS-availability catch, not a construct bug: upstream's v2.263.0 table carriesVER_16_4, which AWS has retired — fixtures must cross-checkdescribe-db-engine-versions.