Skip to content

Commit

Permalink
chore(release): 2.181.1 (aws#33612)
Browse files Browse the repository at this point in the history
See CHANGELOG
  • Loading branch information
mergify[bot] authored Feb 27, 2025
2 parents f0f4a07 + d814408 commit 9be0d22
Show file tree
Hide file tree
Showing 12 changed files with 282 additions and 109 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.181.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.181.0-alpha.0...v2.181.1-alpha.0) (2025-02-27)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **cognito-identitypool-alpha:** Any `IdentityPool` resources deployed in versions `>=2.179.0` will now fail to deploy. You will need to delete the `IdentityPoolRoleAttachment` from your stack via the console before redeploying.

### Bug Fixes

* **cognito-identitypool-alpha:** prevent stacks from not deploying correctly ([#33609](https://github.com/aws/aws-cdk/issues/33609)) ([a1e2afe](https://github.com/aws/aws-cdk/commit/a1e2afe67cc907fa278503ebc886aa3b5bf97887)), closes [#33510](https://github.com/aws/aws-cdk/issues/33510)

## [2.181.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.180.0-alpha.0...v2.181.0-alpha.0) (2025-02-25)


Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.181.1](https://github.com/aws/aws-cdk/compare/v2.181.0...v2.181.1) (2025-02-27)

## [2.181.0](https://github.com/aws/aws-cdk/compare/v2.180.0...v2.181.0) (2025-02-25)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class IdentityPool extends Resource implements IIdentityPool {
/**
* Role Provider for the default Role for authenticated users
*/
private readonly roleAttachment: CfnIdentityPoolRoleAttachment;
private readonly roleAttachment: IdentityPoolRoleAttachment;

/**
* List of Identity Providers added in constructor for use with property overrides
Expand Down Expand Up @@ -495,18 +495,11 @@ export class IdentityPool extends Resource implements IIdentityPool {
this.unauthenticatedRole = props.unauthenticatedRole ? props.unauthenticatedRole : this.configureDefaultRole('Unauthenticated');

// Set up Role Attachment
const mappings = props.roleMappings || [];
let roleMappings: any = undefined;
if (mappings) {
roleMappings = this.configureRoleMappings(...mappings);
}
this.roleAttachment = new CfnIdentityPoolRoleAttachment(this, 'DefaultRoleAttachment', {
identityPoolId: this.identityPoolId,
roles: {
authenticated: this.authenticatedRole.roleArn,
unauthenticated: this.unauthenticatedRole.roleArn,
},
roleMappings,
this.roleAttachment = new IdentityPoolRoleAttachment(this, 'DefaultRoleAttachment', {
identityPool: this,
authenticatedRole: this.authenticatedRole,
unauthenticatedRole: this.unauthenticatedRole,
roleMappings: props.roleMappings,
});

Array.isArray(this.roleAttachment);
Expand Down Expand Up @@ -544,6 +537,79 @@ export class IdentityPool extends Resource implements IIdentityPool {
},
}, 'sts:AssumeRoleWithWebIdentity');
}
}

/**
* Represents an Identity Pool Role Attachment
*/
interface IIdentityPoolRoleAttachment extends IResource {
/**
* ID of the Attachment's underlying Identity Pool
*/
readonly identityPoolId: string;
}

/**
* Props for an Identity Pool Role Attachment
*/
interface IdentityPoolRoleAttachmentProps {

/**
* ID of the Attachment's underlying Identity Pool
*/
readonly identityPool: IIdentityPool;

/**
* Default authenticated (User) Role
* @default - No default authenticated Role will be added
*/
readonly authenticatedRole?: IRole;

/**
* Default unauthenticated (Guest) Role
* @default - No default unauthenticated Role will be added
*/
readonly unauthenticatedRole?: IRole;

/**
* Rules for mapping roles to users
* @default - No role mappings
*/
readonly roleMappings?: IdentityPoolRoleMapping[];
}

/**
* Defines an Identity Pool Role Attachment
*
* @resource AWS::Cognito::IdentityPoolRoleAttachment
*/
class IdentityPoolRoleAttachment extends Resource implements IIdentityPoolRoleAttachment {
/**
* ID of the underlying Identity Pool
*/
public readonly identityPoolId: string;

constructor(scope: Construct, id: string, props: IdentityPoolRoleAttachmentProps) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
this.identityPoolId = props.identityPool.identityPoolId;
const mappings = props.roleMappings || [];
let roles: any = undefined, roleMappings: any = undefined;
if (props.authenticatedRole || props.unauthenticatedRole) {
roles = {};
if (props.authenticatedRole) roles.authenticated = props.authenticatedRole.roleArn;
if (props.unauthenticatedRole) roles.unauthenticated = props.unauthenticatedRole.roleArn;
}
if (mappings) {
roleMappings = this.configureRoleMappings(...mappings);
}
new CfnIdentityPoolRoleAttachment(this, 'Resource', {
identityPoolId: this.identityPoolId,
roles,
roleMappings,
});
}

/**
* Configures role mappings for the Identity Pool Role Attachment
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
"PooltestClientFE8D4935"
]
},
"identitypoolDefaultRoleAttachment9339A8E5": {
"identitypoolDefaultRoleAttachment6BCAB114": {
"Type": "AWS::Cognito::IdentityPoolRoleAttachment",
"Properties": {
"IdentityPoolId": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9be0d22

Please sign in to comment.