Skip to content

Commit 70c0fb6

Browse files
committed
Add prop to pass IAM policies to build project.
1 parent 15aa7c5 commit 70c0fb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/embedded-linux-pipeline.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export interface EmbeddedLinuxPipelineProps extends cdk.StackProps {
4848
readonly projectKind?: ProjectKind;
4949
/** A name for the layer-repo that is created. Default is 'layer-repo' */
5050
readonly layerRepoName?: string;
51+
/** Additional policy statements to add to the build project. */
52+
readonly buildPolicyAdditions?: iam.PolicyStatement[];
5153
}
5254

5355
/**
@@ -199,6 +201,10 @@ export class EmbeddedLinuxPipelineStack extends cdk.Stack {
199201
},
200202
});
201203

204+
if (props.buildPolicyAdditions) {
205+
props.buildPolicyAdditions.map(p => project.addToRolePolicy(p))
206+
}
207+
202208
if (props.projectKind && props.projectKind == ProjectKind.PokyAmi) {
203209
outputBucket.grantReadWrite(project);
204210
project.addToRolePolicy(this.addVMExportPolicy());

0 commit comments

Comments
 (0)