feat(aws): storage.docdb — complete aws-docdb port [stacked on #149] - #150
Open
so0k wants to merge 1 commit into
Open
feat(aws): storage.docdb — complete aws-docdb port [stacked on #149]#150so0k wants to merge 1 commit into
so0k wants to merge 1 commit into
Conversation
First non-RDS database module: all 8 upstream files into storage.docdb. CaCertificate reused from ../rds (the Phase-0 decoupling); rotation rides the live-proven SecretRotation SAR mechanism (mongo apps; attach() injects engine/ssl fields the rotation Lambda requires); DocDB Serverless v2 maps as a native typed block (serverless-ness known synchronously — no addOverride needed, unlike rds). Instance naming: derived grid-scoped cluster identifier as base (<clusterid>instanceN) — upstream's base-defaults-to-cluster-name semantic + repo invariant both preserved (regression-tested; run 1 exposed the provider tf-* auto-name). 103 tests. Live integ docdb.cluster: DocumentDB 5.0 + db.t3.medium, mongo secret merge, drift oracle clean, PASS 1012s (run 2 re-proves with grid-named instances).
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 7 —
storage.docdb: the complete aws-docdb port (v2.263.0)Stacked on #149. First non-RDS database module, proving the slice's reuse story: all 8 upstream files (1,608 LOC) into a new
storage.docdbsub-namespace, 103 tests.Reuse story (the point of the stack's ordering)
CaCertificateimports from../rds— the exact decoupling the Phase-0 prereqs PR (feat(aws): storage slice prereqs — SecretRotation (SAR) unblock, storage.rds scaffolding, CaCertificate #142) set up.addRotationSingleUser/MultiUser) rides the live-provenencryption.SecretRotationSAR mechanism with the MongoDB rotation apps.storage.rds: generated-password double-freeze (master_password+ secret version underignore_changes), removalPolicy →skipFinalSnapshot/finalSnapshotIdentifier+ synth-time warning,attach()with number-typedportanddbClusterIdentifier, gridUUID-lowercased naming.Notable specifics
addOverrideneeded, because DocDB's serverless-ness is known synchronously from props rather than discovered post-instance-bind. (The cdktn block-typed-Lazy footgun only bites when the value is late-bound.)attach()hard-injectsengine: "mongo"andssl: "true"into the secret's connection fields — the MongoDB rotation Lambda requires them and DocDB defaults to TLS (documented deviation; CFN's server-side merge does the same).uniqueResourceNamewould collide across the creation loop, so instances reuse the derived (grid-scoped, lowercased) cluster identifier as their base —<clusterid>instance1— preserving upstream's "base defaults to cluster name" semantic and the repo invariant (regression-tested; run 1's receipts show the providertf-*auto-name this replaced).copyTagsToSnapshot(no cluster-level provider arg; the instance-level one exists but repurposing it would change semantics — documented), Lambda-backed log retention (nativeenabled_cloudwatch_logs_exportsis wired), CFN reference-marker interfaces.manage_master_user_password(provider-native, no upstream prop) deliberately not surfaced this slice — noted as a follow-up candidate.Live integ (
make docdb.cluster) — receipts in threadReal DocumentDB 5.0 cluster +
db.t3.mediuminstance in an isolated VPC: cluster/instance read-backs over the RDS API, the attached secret's full mongo connection payload (username/password/engine/ssl/host/number-port/dbClusterIdentifier), post-apply drift oracle, clean destroy. Run 1 PASS 1012s validated everything and exposed the provider-auto-named instance that motivated the naming fix; run 2 re-proves the full cycle with grid-named instances.