Skip to content

Commit

Permalink
Merge pull request #2 from vendrinc/lora-reames-patch-1
Browse files Browse the repository at this point in the history
chore: Update spelling index.ts
  • Loading branch information
lora-reames authored Dec 22, 2023
2 parents a36fe62 + b492f8f commit 4886e3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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: {
Expand All @@ -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-*/*"],
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("Account Closure Construct", () => {
this,
"AccountClosureStepFunctionConstruct",
{
privledgedRoleArn: "arn:aws:iam::123456789012:role/PrivledgedRole",
privilegedRoleArn: "arn:aws:iam::123456789012:role/PrivilegedRole",
}
);
}
Expand Down

0 comments on commit 4886e3e

Please sign in to comment.