diff --git a/src/patterns/__snapshots__/instance-role.test.ts.snap b/src/constructs/iam/roles/__snapshots__/instance-role.test.ts.snap similarity index 100% rename from src/patterns/__snapshots__/instance-role.test.ts.snap rename to src/constructs/iam/roles/__snapshots__/instance-role.test.ts.snap diff --git a/src/constructs/iam/roles/index.ts b/src/constructs/iam/roles/index.ts new file mode 100644 index 000000000..f42f2adf1 --- /dev/null +++ b/src/constructs/iam/roles/index.ts @@ -0,0 +1,2 @@ +export * from "./instance-role"; +export * from "./roles"; diff --git a/src/patterns/instance-role.test.ts b/src/constructs/iam/roles/instance-role.test.ts similarity index 92% rename from src/patterns/instance-role.test.ts rename to src/constructs/iam/roles/instance-role.test.ts index e39d9882a..67e1fd322 100644 --- a/src/patterns/instance-role.test.ts +++ b/src/constructs/iam/roles/instance-role.test.ts @@ -1,7 +1,7 @@ import "@aws-cdk/assert/jest"; import { SynthUtils } from "@aws-cdk/assert"; -import { simpleGuStackForTesting } from "../../test/utils"; -import { GuGetS3ObjectPolicy } from "../constructs/iam"; +import { simpleGuStackForTesting } from "../../../../test/utils"; +import { GuGetS3ObjectPolicy } from "../policies"; import { GuInstanceRole } from "./instance-role"; describe("The GuInstanceRole construct", () => { diff --git a/src/patterns/instance-role.ts b/src/constructs/iam/roles/instance-role.ts similarity index 88% rename from src/patterns/instance-role.ts rename to src/constructs/iam/roles/instance-role.ts index fa1d349a6..77ada6323 100644 --- a/src/patterns/instance-role.ts +++ b/src/constructs/iam/roles/instance-role.ts @@ -1,14 +1,14 @@ import { ServicePrincipal } from "@aws-cdk/aws-iam"; -import type { GuStack } from "../constructs/core"; -import type { GuPolicy } from "../constructs/iam"; +import type { GuStack } from "../../core"; +import type { GuPolicy } from "../policies"; import { GuDescribeEC2Policy, GuGetDistributablePolicy, GuLogShippingPolicy, GuParameterStoreReadPolicy, - GuRole, GuSSMRunCommandPolicy, -} from "../constructs/iam"; +} from "../policies"; +import { GuRole } from "../roles"; interface GuInstanceRoleProps { withoutLogShipping?: boolean; // optional to have log shipping added by default, you have to opt out diff --git a/src/constructs/iam/roles.test.ts b/src/constructs/iam/roles/roles.test.ts similarity index 88% rename from src/constructs/iam/roles.test.ts rename to src/constructs/iam/roles/roles.test.ts index 3c1d84486..17b4e2a9e 100644 --- a/src/constructs/iam/roles.test.ts +++ b/src/constructs/iam/roles/roles.test.ts @@ -1,8 +1,8 @@ import { SynthUtils } from "@aws-cdk/assert"; import "@aws-cdk/assert/jest"; import { ServicePrincipal } from "@aws-cdk/aws-iam"; -import { simpleGuStackForTesting } from "../../../test/utils/simple-gu-stack"; -import type { SynthedStack } from "../../../test/utils/synthed-stack"; +import { simpleGuStackForTesting } from "../../../../test/utils/simple-gu-stack"; +import type { SynthedStack } from "../../../../test/utils/synthed-stack"; import { GuRole } from "./roles"; describe("The GuRole class", () => { diff --git a/src/constructs/iam/roles.ts b/src/constructs/iam/roles/roles.ts similarity index 92% rename from src/constructs/iam/roles.ts rename to src/constructs/iam/roles/roles.ts index 8582acb27..5548b0829 100644 --- a/src/constructs/iam/roles.ts +++ b/src/constructs/iam/roles/roles.ts @@ -1,6 +1,6 @@ import type { CfnRole, RoleProps } from "@aws-cdk/aws-iam"; import { Role } from "@aws-cdk/aws-iam"; -import type { GuStack } from "../core"; +import type { GuStack } from "../../core"; export interface GuRoleProps extends RoleProps { overrideId?: boolean; diff --git a/src/patterns/index.ts b/src/patterns/index.ts index a57d528d0..6fd6af1e8 100644 --- a/src/patterns/index.ts +++ b/src/patterns/index.ts @@ -1 +1 @@ -export * from "./instance-role"; +export * from "./scheduled-lambda";