From a08af8a2976c925e203efe68065019bb8c1f4d4b Mon Sep 17 00:00:00 2001 From: John Hockett Date: Sat, 20 Nov 2021 03:21:47 -0800 Subject: [PATCH] fix: rest iam policy roles array, bump ext helper types version (#8983) --- .../awscloudformation/overrides-resource/APIGW/package.json | 2 +- .../awscloudformation/overrides-resource/AppSync/package.json | 4 ++-- .../cdk-stack-builder/apigw-stack-builder.ts | 2 +- packages/amplify-cli-extensibility-helper/src/index.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/amplify-category-api/resources/awscloudformation/overrides-resource/APIGW/package.json b/packages/amplify-category-api/resources/awscloudformation/overrides-resource/APIGW/package.json index 6d72b44035a..799f23a0982 100644 --- a/packages/amplify-category-api/resources/awscloudformation/overrides-resource/APIGW/package.json +++ b/packages/amplify-category-api/resources/awscloudformation/overrides-resource/APIGW/package.json @@ -11,7 +11,7 @@ "fs-extra": "^9.1.0" }, "devDependencies": { - "@aws-amplify/cli-extensibility-helper": "^2.2.2", + "@aws-amplify/cli-extensibility-helper": "2.3.0-apiext3.0", "@types/fs-extra": "^9.0.11", "typescript": "^4.2.4" } diff --git a/packages/amplify-category-api/resources/awscloudformation/overrides-resource/AppSync/package.json b/packages/amplify-category-api/resources/awscloudformation/overrides-resource/AppSync/package.json index d8eb0d191de..bdc2c15a654 100644 --- a/packages/amplify-category-api/resources/awscloudformation/overrides-resource/AppSync/package.json +++ b/packages/amplify-category-api/resources/awscloudformation/overrides-resource/AppSync/package.json @@ -7,9 +7,9 @@ "watch": "tsc -w" }, "dependencies": { - "@aws-amplify/cli-extensibility-helper": "2.2.3-gql-ext1.0" + "@aws-amplify/cli-extensibility-helper": "2.3.0-apiext3.0" }, "devDependencies": { "typescript": "^4.2.4" } -} \ No newline at end of file +} diff --git a/packages/amplify-category-api/src/provider-utils/awscloudformation/cdk-stack-builder/apigw-stack-builder.ts b/packages/amplify-category-api/src/provider-utils/awscloudformation/cdk-stack-builder/apigw-stack-builder.ts index 187a9b71fe1..cf03e0ea280 100644 --- a/packages/amplify-category-api/src/provider-utils/awscloudformation/cdk-stack-builder/apigw-stack-builder.ts +++ b/packages/amplify-category-api/src/provider-utils/awscloudformation/cdk-stack-builder/apigw-stack-builder.ts @@ -128,7 +128,7 @@ export class AmplifyApigwResourceStack extends cdk.Stack implements AmplifyApigw const iamPolicy = new iam.CfnPolicy(this, `${groupName}Group${alphanumericPathName}Policy`, { policyDocument: this._craftPolicyDocument(apiResourceName, pathName, supportedOperations), policyName, - roles: [cdk.Fn.join('-', [cdk.Fn.ref(authRoleLogicalId), 'UsersGroupRole'])], + roles: [cdk.Fn.join('-', [cdk.Fn.ref(authRoleLogicalId), `${groupName}GroupRole`])], }); this.policies[pathName] = { groups: { diff --git a/packages/amplify-cli-extensibility-helper/src/index.ts b/packages/amplify-cli-extensibility-helper/src/index.ts index 237d215c939..79d2bda535e 100644 --- a/packages/amplify-cli-extensibility-helper/src/index.ts +++ b/packages/amplify-cli-extensibility-helper/src/index.ts @@ -1,7 +1,7 @@ import { addCDKResourceDependency, AmplifyResourceProps } from '@aws-amplify/amplify-category-custom'; import { getProjectInfo } from './helpers/project-info'; export { AmplifyApiGraphQlResourceStackTemplate } from './types/api/amplify-api-resource-stack-types'; -export { AmplifyApiRestResourceStackTemplate } from './types/api/types'; +export { AmplifyApiRestResourceStackTemplate, ApigwPathPolicy } from './types/api/types'; export { AmplifyAuthCognitoStackTemplate, AmplifyUserPoolGroupStackTemplate } from './types/auth/types'; export { AmplifyRootStackTemplate } from './types/project/types'; export { AmplifyCDKL1, AmplifyDDBResourceTemplate, AmplifyS3ResourceTemplate } from './types/storage/types';