From 47cadcce43b8173b9cd1b346010a7263469fe313 Mon Sep 17 00:00:00 2001 From: watany <76135106+watany-dev@users.noreply.github.com> Date: Thu, 12 May 2022 09:14:27 +0900 Subject: [PATCH] fix(base-standalone): Replace deprecated IAM Policy `AWSConfigRole` with `AWS_ConfigRole` (#46) --- usecases/base-standalone/lib/blea-config-stack.ts | 2 +- .../test/__snapshots__/blea-base-sa.test.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usecases/base-standalone/lib/blea-config-stack.ts b/usecases/base-standalone/lib/blea-config-stack.ts index 88e6a8791..7109535e0 100644 --- a/usecases/base-standalone/lib/blea-config-stack.ts +++ b/usecases/base-standalone/lib/blea-config-stack.ts @@ -10,7 +10,7 @@ export class BLEAConfigStack extends cdk.Stack { const role = new iam.Role(this, 'ConfigRole', { assumedBy: new iam.ServicePrincipal('config.amazonaws.com'), - managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSConfigRole')], + managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWS_ConfigRole')], }); new config.CfnConfigurationRecorder(this, 'ConfigRecorder', { diff --git a/usecases/base-standalone/test/__snapshots__/blea-base-sa.test.ts.snap b/usecases/base-standalone/test/__snapshots__/blea-base-sa.test.ts.snap index 47d82292e..8f14fd5e1 100644 --- a/usecases/base-standalone/test/__snapshots__/blea-base-sa.test.ts.snap +++ b/usecases/base-standalone/test/__snapshots__/blea-base-sa.test.ts.snap @@ -1228,7 +1228,7 @@ Object { Object { "Ref": "AWS::Partition", }, - ":iam::aws:policy/service-role/AWSConfigRole", + ":iam::aws:policy/service-role/AWS_ConfigRole", ], ], },