From 0d36d634f83c270ee3be5ac5d67b7d6c969ebe9a Mon Sep 17 00:00:00 2001 From: Lora Reames Date: Fri, 22 Dec 2023 17:03:07 -0600 Subject: [PATCH 1/3] Update spelling index.ts i forgot an i in privileged --- src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 611f35a..a478854 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,7 @@ import { CallAwsService } from "aws-cdk-lib/aws-stepfunctions-tasks"; import { Construct } from "constructs"; export interface AccountClosureStepFunctionProps { - readonly privledgedRoleArn: string; // TODO provide example role for repo with all required permissions + readonly privilegedRoleArn: string; // TODO provide example role for repo with all required permissions } export class AccountClosureStepFunction extends Construct { constructor( @@ -26,12 +26,12 @@ export class AccountClosureStepFunction extends Construct { props: AccountClosureStepFunctionProps ) { super(scope, id); - const privledgedRole = TaskRole.fromRole( - Role.fromRoleArn(this, "PrivledgedRole", props.privledgedRoleArn) + const privilegedRole = TaskRole.fromRole( + Role.fromRoleArn(this, "PrivilegedRole", props.privilegedRoleArn) ); const describeAccount = new CallAwsService(this, "describeAccount", { - credentials: { role: privledgedRole }, + credentials: { role: privilegedRole }, comment: "Describe Account", service: "organizations", action: "describeAccount", @@ -59,7 +59,7 @@ export class AccountClosureStepFunction extends Construct { }); const findAccounts = new CallAwsService(this, "findAccounts", { - credentials: { role: privledgedRole }, + credentials: { role: privilegedRole }, comment: "Find accounts tagged for closure", service: "resourcegroupstaggingapi", action: "getResources", @@ -85,7 +85,7 @@ export class AccountClosureStepFunction extends Construct { }); const tagAcknowledged = new CallAwsService(this, "tagAcknowledged", { - credentials: { role: privledgedRole }, + credentials: { role: privilegedRole }, service: "organizations", action: "tagResource", parameters: { @@ -105,7 +105,7 @@ export class AccountClosureStepFunction extends Construct { }); const closeAccount = new CallAwsService(this, "closeAccount", { - credentials: { role: privledgedRole }, + credentials: { role: privilegedRole }, service: "organizations", action: "closeAccount", iamResources: ["arn:aws:organizations::*:account/o-*/*"], From 569016ae530370125cba134aa6aee163f702b1c3 Mon Sep 17 00:00:00 2001 From: Lora Reames Date: Fri, 22 Dec 2023 23:10:53 +0000 Subject: [PATCH 2/3] fix test spelling --- test/index.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.test.ts b/test/index.test.ts index e30dcaf..5cad3f0 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -14,7 +14,7 @@ describe("Account Closure Construct", () => { this, "AccountClosureStepFunctionConstruct", { - privledgedRoleArn: "arn:aws:iam::123456789012:role/PrivledgedRole", + privilegedRoleArn: "arn:aws:iam::123456789012:role/PrivilegedRole", } ); } From b492f8fdfa8a831d8d5da527b784694d52530f1c Mon Sep 17 00:00:00 2001 From: Lora Reames Date: Fri, 22 Dec 2023 23:35:48 +0000 Subject: [PATCH 3/3] update API --- API.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 3f7beca..d395e0e 100644 --- a/API.md +++ b/API.md @@ -132,14 +132,14 @@ const accountClosureStepFunctionProps: AccountClosureStepFunctionProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | -| privledgedRoleArn | string | *No description.* | +| privilegedRoleArn | string | *No description.* | --- -##### `privledgedRoleArn`Required +##### `privilegedRoleArn`Required ```typescript -public readonly privledgedRoleArn: string; +public readonly privilegedRoleArn: string; ``` - *Type:* string