feat(aws): storage.rds foundations — engines, groups, DatabaseSecret, canned metrics [stacked on #142] - #144
Open
so0k wants to merge 3 commits into
Open
feat(aws): storage.rds foundations — engines, groups, DatabaseSecret, canned metrics [stacked on #142]#144so0k wants to merge 3 commits into
so0k wants to merge 3 commits into
Conversation
… canned metrics (v2.263.0)
RDS PR 2a: engine.ts, engine-version.ts, database-insights-mode.ts,
validate-database-insights.ts, endpoint.ts, perms.ts, props.ts,
private/{util,ref-utils}.ts, subnet-group.ts (CDK-shaped fresh port),
parameter-group.ts (ONE L2 lazily binding BOTH aws_db_parameter_group and
aws_rds_cluster_parameter_group, mirroring upstream bindToInstance/
bindToCluster), option-group.ts, database-secret.ts, and
rds-canned-metrics.generated.ts from the real spec2cdk generate phase
(rds-augmentations deferred to the cluster PR — needs ./instance and
./cluster-ref).
Deviations of note: apply_method left at provider default (documented;
static params fail at apply until exposed), replaceOnPasswordCriteriaChanges
is a synth-warned no-op (Terraform locks resource addresses on first
attribute read), unnamed groups get gridUUID-scoped uniqueResourceName
defaults (lowercased) per repo invariant instead of terraform-<hash>.
Live integ make rds.groups: SubnetGroup + both parameter-group binds +
OptionGroup (MARIADB_AUDIT_PLUGIN) + DatabaseSecret, SDK read-backs +
drift oracle. Run 1 caught the generated-password drift fixed on the
storage-prereqs branch (see PR 1).
…gnore_changes (rebase on storage-prereqs fcf11e9)
…ture immediate deletion Live run 2 failed re-creating the deterministic secret name inside AWS's 30-day deletion-recovery window from run 1's destroy. recoveryWindow is a documented TERRACONSTRUCTS DEVIATION (CFN deletes immediately; recovery_window_in_days is provider-level); fixture uses Duration.days(0). Live run 3: PASS 44.73s, 13/13, drift oracle clean.
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 2/N —
storage.rdsfoundations (v2.263.0)Stacked on #142. Lands the RDS foundation layer so the engine-table, instance, cluster, and proxy PRs can stack on top:
engine.ts,engine-version.ts,database-insights-mode.ts,validate-database-insights.ts,endpoint.ts,perms.ts,props.ts,private/{util,ref-utils}.ts,subnet-group.ts,parameter-group.ts,option-group.ts,database-secret.ts,rds-canned-metrics.generated.ts+ ported upstream test suites (60 tests, snapshots).Design points
ParameterGroup: one L2, two Terraform resources. Upstream lazily createsCfnDBParameterGroup/CfnDBClusterParameterGrouponbindToInstance()/bindToCluster(); the port mirrors that exactly withaws_db_parameter_group/aws_rds_cluster_parameter_group. Both live-verified via SDK read-backs (DescribeDBParameters/DescribeDBClusterParametersfiltered toSource=user). Note:get outputs()carriesclusterName/clusterArnalongside the barename/arn— a documented deviation from the bare-key convention because one construct can back two resources; flagging for review.SubnetGroupis a fresh CDK-shaped port (vpc+vpcSubnets) ontoaws_db_subnet_group— deliberately not reusing the deprecatednetwork/subnet-group.ts.rds-canned-metrics.generated.tscomes from aws-cdk's real generate phase (in-repo spec2cdk at v2.263.0 with@aws-cdk/aws-service-spec@0.1.193, validated to reproduce the published bundle) — not hand-written, not reconstructed from.js/.d.ts.rds-augmentations.generated.tsis deferred to the cluster PR (it declare-module-merges./instanceand./cluster-ref).uniqueResourceNamedefaults (lowercased — RDS stores these names lowercase) instead of the provider's opaqueterraform-<hash>.Documented deviations to review
apply_methodon parameters is left at the provider default (immediate) — Terraform-only field with no CFN analogue; static engine parameters will fail at apply until it's exposed (noted as pre-instance-PR follow-up inrenderParameters()).replaceOnPasswordCriteriaChangesis accepted but currently a no-op (Terraform locks resource addresses on first attribute read — structural, documented in depth on the prop) and now warns at synth viaAnnotations.DatabaseSecret.recoveryWindowadded (not upstream) — CFN deletes secrets immediately;recovery_window_in_daysis the provider analogue and deterministic names needDuration.days(0)in fixtures.OptionGroupProps.enginetemporarily widened toIEngineuntilinstance-engine.tslands in the next PR — marked as a must-fix-before-release jsii-breaking tightening.Live integ (
integ/aws/storage,make rds.groups)Fixture: isolated VPC +
SubnetGroup+ oneParameterGroupbound both ways +OptionGroupwith a realMARIADB_AUDIT_PLUGINoption +DatabaseSecret. No instances — free/fast, validating the Terraform mapping round-trip with SDK read-backs and the post-apply drift oracle.Three-run evidence story (receipts in thread):
encryption.Secret—generateSecretStringuses the random-password data source, which regenerates every plan, so every apply would replace the live password. Fixed on feat(aws): storage slice prereqs — SecretRotation (SAR) unblock, storage.rds scaffolding, CaCertificate #142 (ignore_changes = [secret_string]for construct-generated values; CFN generates once at create — this is parity). Also exposed theterraform-<hash>naming-invariant miss.recoveryWindowpass-through.