Skip to content

Commit

Permalink
Merge pull request #200 from guardian/jl/move-instance-role
Browse files Browse the repository at this point in the history
Move instance role to constructs
  • Loading branch information
Jamie Lynch authored Jan 25, 2021
2 parents 2cb17b8 + e87e260 commit f650b5c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/constructs/iam/roles/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./instance-role";
export * from "./roles";
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/patterns/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./instance-role";
export * from "./scheduled-lambda";

0 comments on commit f650b5c

Please sign in to comment.