Skip to content

Commit 746c9c6

Browse files
Merge pull request #8 from hove-io/ahi-update-ec2
feat: update policy for ec2 image builder
2 parents 6e7ae4d + 64b88ab commit 746c9c6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

modules/runners/policies-runner.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,11 @@ resource "aws_iam_role_policy" "ec2" {
6161
policy = templatefile("${path.module}/policies/instance-ec2.json", {})
6262
}
6363

64+
resource "aws_iam_role_policy" "ec2_image_builder" {
65+
name = "ec2-image-builder"
66+
role = aws_iam_role.runner.name
67+
policy = templatefile("${path.module}/policies/instance-ec2-image-builder.json", {})
68+
}
69+
70+
6471
// see also logging.tf for logging and metrics policies
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Effect": "Allow",
6+
"Action": "imagebuilder:StartImagePipelineExecution ",
7+
"Resource": "*"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)