feat(aws): storage.s3tables — @aws-cdk/aws-s3tables-alpha port - #155
Open
so0k wants to merge 3 commits into
Open
feat(aws): storage.s3tables — @aws-cdk/aws-s3tables-alpha port#155so0k wants to merge 3 commits into
so0k wants to merge 3 commits into
Conversation
…263.0-alpha.0 Full port of the s3tables alpha module into the storage.s3tables sub-namespace: TableBucket, TableBucketPolicy, Table, TablePolicy, Namespace, permissions, util — 188 unit tests across all 8 upstream suites. - maintenance_configuration is an OBJECT-typed provider attribute requiring ALL members: absent compaction/snapshotManagement renders as a null-filled member (null leaves are valid; omitting the member fails terraform validate, and a literal-null MEMBER crashes the generated L1 setter) — regression tests for both one-sided shapes, independently proven via synth + tofu validate - encryption → encryption_configuration (sse_algorithm AES256/aws:kms + kms_key_arn — id-vs-ARN audit); upstream auto-created-KMS-key path mirrored with encryption.Key - unreferencedFileRemoval → maintenance_configuration iceberg_unreferenced_file_removal (Duration → day numbers, validation verbatim) - account/region stripped in every constructor (grant same-account short-circuit footgun — pinned by regression test) - tableBucketName/tableName/namespaceName kept REQUIRED per upstream fidelity (documented deviation from the grid-default house pattern — flagged for review) - alpha provenance headers + churn tracker; policies render iam.PolicyDocument as resource_policy JSON
…table Real S3 Tables stack: bucket/namespace/table read-backs (GetTableBucket / GetNamespace / GetTable), GetTableMaintenanceConfiguration asserting the compaction-only maintenance shape (enabled, 128MB target) — the null-filled absent-member design proven live — and the post-apply drift oracle. Adds aws-sdk-go-v2/service/s3tables v1.18.4.
…fter apply' finding Live run 1 failed: S3 Tables AUTO-POPULATES server-side defaults for every unset maintenance value and returns them on read (snapshot_management came back enabled/1/120 against planned nulls), so null-filled leaves violate the provider apply contract. Absent maintenance members/leaves are now pinned to AWS's documented defaults (compaction enabled/512MB; snapshot management enabled/120h/1 snapshot). Regression tests updated for both one-sided shapes; integ fixture extended with a snapshot-only table so BOTH default-filled sides are live-proven; orphaned run-1 resources destroyed cleanly (3).
Contributor
Author
Live integ 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 12 —
storage.s3tables: the @aws-cdk/aws-s3tables-alpha port (v2.263.0-alpha.0)Stacked on #154. The final module of the storage slice. TableBucket, TableBucketPolicy, Table, TablePolicy, Namespace, permissions, util — 188 unit tests across all 8 upstream suites. Fourth alpha port, same disciplines: alpha-churn tracker, provenance headers, deviation notes.
The maintenance_configuration find (workflow blocker → live finding, 11th live-only defect class)
aws_s3tables_table.maintenance_configurationis an object-typed provider attribute (not a block): Terraform object types require ALL members. FOUR wrong shapes were eliminated in sequence — the last one only catchable live:terraform validatefails:attribute "iceberg_snapshot_management" is required;nullmember → the generated L1's nestedOutputReferencesetter crashes (Object.keys(null));terraform validateAND synth, but fails live apply: S3 Tables auto-populates server-side defaults for every unset maintenance value and returns them on read (Provider produced inconsistent result after apply: was null, but now cty.NumberIntVal(120)— receipts in thread);Regression tests cover both one-sided shapes; the live fixture deploys BOTH one-sided tables so both default-filled sides are proven against AWS.
Mapping notes
encryption→encryption_configuration(sse_algorithmAES256/aws:kms +kms_key_arn— id-vs-ARN audit pre-applied); the upstream auto-created-KMS-key path mirrored withencryption.Key.unreferencedFileRemoval→maintenance_configuration.iceberg_unreferenced_file_removal(Durations → day numbers, upstream validation verbatim).account/region(newly exposed viaAwsConstructProps) are stripped in every constructor — forwarding them defeats the same-account short-circuit iniam.Grant, spuriously attaching resource policies on every grant. Pinned by a regression test.iam.PolicyDocumentasresource_policyJSON.Flagged for review
tableBucketName/tableName/namespaceNameare kept required (upstream requires them; documented deviation note in-source). This diverges from the griduniqueResourceNamedefault used elsewhere in the slice — making them optional with grid defaults is an additive change we can make later if preferred.Live integ (
make s3tables.table) — receipts in threadReal TableBucket + Namespace + ICEBERG Table:
GetTableBucket/GetNamespace/GetTableread-backs,GetTableMaintenanceConfigurationreading back compaction enabled @128mb from the one-sided (null-filled) maintenance shape, drift oracle, clean destroy (force_destroy).