Skip to content

Commit

Permalink
fix: adds userPool resourceName instead of authResource (#8497)
Browse files Browse the repository at this point in the history
* fix: adds userPool resourceName instead of authResource

* fix: roleName in userPool groups
  • Loading branch information
akshbhu authored Oct 20, 2021
1 parent ee9b35d commit c4f5560
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ exports.handler = (event, context) => {
Object {
"Ref": "authmockResourceUserPoolId",
},
"adinGroupRole",
"-adinGroupRole",
],
],
},
Expand Down Expand Up @@ -579,7 +579,7 @@ exports.handler = (event, context) => {
Object {
"Ref": "authmockResourceUserPoolId",
},
"adinmockGroupRole",
"-adinmockGroupRole",
],
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class AmplifyUserPoolGroupStack extends cdk.Stack implements AmplifyUserP
this.userPoolGroupRole[`${group.groupName}`] = new iam.CfnRole(this, `${group.groupName}GroupRole`, {
roleName: cdk.Fn.join('', [
this.getCfnParameter(getCfnParamslogicalId(props.cognitoResourceName, 'UserPoolId'))!.valueAsString,
`${group.groupName}GroupRole`,
`-${group.groupName}GroupRole`,
]),
assumeRolePolicyDocument: {
Version: '2012-10-17',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ export class AmplifyUserPoolGroupTransform extends AmplifyCategoryTransform {
};

public saveBuildFiles = async (context: $TSContext, template: Template): Promise<void> => {
const cognitoStackFileName = `${this.resourceName}-cloudformation-template.json`;
const cognitoStackFileName = `${this._resourceName}-cloudformation-template.json`;
const cognitostackFilePath = path.join(
pathManager.getBackendDirPath(),
this._category,
this.resourceName,
this._resourceName,
'build',
cognitoStackFileName,
);
Expand Down

0 comments on commit c4f5560

Please sign in to comment.