feat(aws): storage.elasticache — elasticache-alpha port [stacked on #150] - #151
feat(aws): storage.elasticache — elasticache-alpha port [stacked on #150]#151so0k wants to merge 1 commit into
Conversation
Live apply/verify/destroy receipts —
|
…at v2.263.0-alpha.0 First alpha-package port: ServerlessCache + IAM/Password/NoPassword users + UserGroup (the alpha's full, deliberately narrow surface — nothing invented). elasticache-grants.generated.ts reconstructed as genuine TS from the built alpha bundle (projen grants codegen; spec2cdk doesn't emit grants); aws-cdk-lib/interfaces markers stripped with TODO permalinks; alpha-churn tracker heads the barrel. 190 tests. Live-caught construct defect (10th of the campaign): kms_key_id must be the key ARN — CFN's KmsKeyId accepts id-or-ARN so upstream never noticed, but AWS stores the ARN and Terraform's read-back flags 'Provider produced inconsistent result after apply' when given the bare id. Fixed + regression test. Live integ elasticache.serverless-cache (port of upstream's own integ): Valkey 8 + usage limits + IamUser/UserGroup, drift-clean, PASS 636.31s.
8298687 to
98f692b
Compare
…3.0-alpha.0 All 6 upstream files into storage.neptune, 83 tests. Neptune Serverless maps as a native typed serverless_v2_scaling_configuration block (docdb pattern — value known synchronously, no addOverride) with upstream's full validation set. kmsKey → kms_key_arn (the #151 id-vs-ARN lesson pre-applied). grant/grantConnect render neptune-db IAM statements against the clusterResourceIdentifier ARN with lazy iam-auth enablement. House patterns: grid-lowercased identifiers + derived-base instance naming (<clusterid>instanceN, regression-tested), skipFinalSnapshot/ finalSnapshotIdentifier + synth warning, Lambda-backed log retention TODO-omitted (native enable_cloudwatch_logs_exports wired). Build note: the conversion workflow died twice on API-connection failures and stalled; the 936-line cluster.test.ts port and gates were completed by hand (33 ported + 2 LogRetention comment-omitted + 2 repo additions). Live integ neptune.cluster: real Neptune Serverless 1-2.5 NCU + db.serverless instance, ServerlessV2ScalingConfiguration read back, grid-derived instance id asserted live, drift-clean, PASS 1684.18s.
Storage slice PR 8 —
storage.elasticache: the @aws-cdk/aws-elasticache-alpha port (v2.263.0-alpha.0)Stacked on #150. First alpha-package port of the slice: all 9 upstream files into
storage.elasticache, 190 tests.Scope honesty (deliberate narrowness)
The upstream alpha covers ServerlessCache + Users (IAM/Password/NoPassword) + UserGroup only — there is no upstream L2 for classic clusters or replication groups, and none was invented here. An alpha-churn tracker comment heads the barrel: this module must be re-diffed against upstream on every reference-tag bump (experimental surfaces churn without deprecation cycles).
Alpha-specific mechanics
elasticache-grants.generated.tsreconstructed as genuine TS from the built@aws-cdk/aws-elasticache-alpha@2.263.0-alpha.0bundle (the file is gitignored upstream, generated by projen grants codegen — spec2cdk does not emit grants); wiring mirrors thesqs-grantsprecedent, grant actions verified byte-for-byte.aws-cdk-lib/interfacesmarker imports (IServerlessCacheRefetc.) are stripped with TODO permalinks — same pattern as the rds/docdb*Refomissions, with a local structural-typing shim where the grants file needs the shape.Mapping notes
UserGroup.addUseruses the L1's inlineuser_ids(no separate association resource needed — CFN'sUserIdsis inline too; documented deviation).IamUser's userName==userId invariant survives lowercasing with a self-explanatory error for mixed-case inputs.serverlessCacheStatusread-back restored after the adversarial verify caught a false "provider doesn't expose it" omission claim (the only major finding — the L1 does exposestatus).Schedule→daily_snapshot_time) and the fullcacheUsageLimitssurface are regression-tested beyond upstream's own coverage.Live integ (
make elasticache.serverless-cache) — receipts in threadPort of upstream's own
integ.serverless-cache.ts: real Valkey 8 serverless cache with KMS key, security groups, backup settings, usage limits (1 GB / 1000–2000 ECPU), an IamUser (on ~* +@all) in a UserGroup attached to the cache. Validates upstream's samedescribeServerlessCachesassertions plus user/user-group read-backs, drift oracle, destroy.