Skip to content

Commit 6b2f1eb

Browse files
committed
remove duplicate constant declaration
1 parent 44e9109 commit 6b2f1eb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/shared/remoteSession.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export async function promptToAddPolicies(client: IamClient, roleArn: string): P
201201
}
202202

203203
function getFormattedSsmActions() {
204-
const formattedActions = minimumSsmActions.map(action => `${action},\n`).reduce((l, r) => l + r)
204+
const formattedActions = minimumSsmActions.map(action => `"${action}",\n`).reduce((l, r) => l + r)
205205

206206
return formattedActions.slice(0, formattedActions.length - 2)
207207
}
@@ -212,10 +212,7 @@ function getSsmPolicyDocument() {
212212
"Statement": {
213213
"Effect": "Allow",
214214
"Action": [
215-
"ssmmessages:CreateControlChannel",
216-
"ssmmessages:CreateDataChannel",
217-
"ssmmessages:OpenControlChannel",
218-
"ssmmessages:OpenDataChannel"
215+
${getFormattedSsmActions()}
219216
],
220217
"Resource": "*"
221218
}

0 commit comments

Comments
 (0)