Skip to content

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Nov 14, 2025

Reason for this change

Adds auto-generated L1 property mixins for all CloudFormation resources, providing type-safe property application with merge strategies.

Note: Still a chore as package is still not yet released. This will come next.

Description of changes

  • Generates type-safe property mixins for every CloudFormation resource across all AWS services
  • Adds package.json exports for all service-specific mixin modules (e.g., @aws-cdk/mixins-preview/aws-s3/mixins)
  • Supports two merge strategies: MERGE (deep merge, default) and OVERWRITE (shallow assign)
  • Enables applying L1 properties to both L1 and L2 constructs with full TypeScript support
  • Updates README with L1 Property Mixins documentation and examples

Example usage:

import '@aws-cdk/mixins-preview/with';
import { CfnBucketPropsMixin } from '@aws-cdk/mixins-preview/aws-s3/mixins';

const bucket = new s3.Bucket(scope, "Bucket")
  .with(new CfnBucketPropsMixin({
    versioningConfiguration: { status: "Enabled" },
    publicAccessBlockConfiguration: {
      blockPublicAcls: true,
      blockPublicPolicy: true
    }
  }));

Describe any new or updated permissions being added

No new or updated IAM permissions.

Description of how you validated changes

  • Generated mixins for all AWS services
  • Verified type safety and merge strategies
  • Updated documentation with examples

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@mrgrain mrgrain requested a review from a team as a code owner November 14, 2025 12:55
@github-actions github-actions bot added the p2 label Nov 14, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 14, 2025 12:55
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 14, 2025
@mrgrain mrgrain changed the title chore(mixins-preview): implement Mixins RFC chore(mixins-preview): add L1 property mixins Nov 14, 2025
@mrgrain mrgrain changed the base branch from main to mrgrain/chore/mixins-pt-1 November 14, 2025 13:01
Base automatically changed from mrgrain/chore/mixins-pt-1 to main November 14, 2025 14:01
@mrgrain mrgrain changed the base branch from main to mrgrain/chore/spec2cdk-li-builder November 17, 2025 08:42
@mrgrain mrgrain force-pushed the mrgrain/chore/spec2cdk-li-builder branch from 5d0c245 to 414234a Compare November 17, 2025 08:47
@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from 8fc92a6 to b8fbd85 Compare November 17, 2025 08:51
@mrgrain mrgrain changed the title chore(mixins-preview): add L1 property mixins feat(mixins-preview): add auto-generated L1 property mixins Nov 17, 2025
@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from b8fbd85 to 2adf353 Compare November 17, 2025 09:43
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from 2adf353 to f7027f9 Compare November 17, 2025 10:18
@mrgrain mrgrain force-pushed the mrgrain/chore/spec2cdk-li-builder branch from 0d5b24a to 50d3abe Compare November 17, 2025 11:23
@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from f7027f9 to cb9b9d4 Compare November 17, 2025 11:26
Base automatically changed from mrgrain/chore/spec2cdk-li-builder to main November 17, 2025 12:49
@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from cb9b9d4 to 63084f4 Compare November 17, 2025 13:28
@mrgrain mrgrain changed the title feat(mixins-preview): add auto-generated L1 property mixins chore(mixins-preview): typed L1 property mixins Nov 17, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review November 17, 2025 13:30

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from 63084f4 to 8d6845e Compare November 17, 2025 13:54
@mergify
Copy link
Contributor

mergify bot commented Nov 18, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 18, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mrgrain mrgrain force-pushed the mrgrain/chore/mixins-l1-property-mixins branch from e7ddd0d to 8c8477d Compare November 18, 2025 13:47
@mrgrain
Copy link
Contributor Author

mrgrain commented Nov 18, 2025

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Nov 18, 2025

refresh

✅ Pull request refreshed

@mergify
Copy link
Contributor

mergify bot commented Nov 18, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 0851ffd into main Nov 18, 2025
19 of 20 checks passed
@mergify mergify bot deleted the mrgrain/chore/mixins-l1-property-mixins branch November 18, 2025 15:02
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants