Skip to content

Commit

Permalink
Create the policy attachements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Kay committed Jul 20, 2020
1 parent 20763eb commit 88d7e12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ resource "aws_iam_role_policy_attachment" "instance_session_manager_aws_managed"
policy_arn = "${var.arn_format}:iam::aws:policy/AmazonSSMManagedInstanceCore"
}

################################################################################
### Add user defined policies
################################################################################
resource "aws_iam_role_policy_attachment" "user_defined_policies" {
count = length(var.runner_iam_policy_arns)
role = aws_iam_role.instance_name
policy_arn = var.runner_iam_policy_arns[index]
}

################################################################################
### Policy for the docker machine instance to access cache
Expand Down

0 comments on commit 88d7e12

Please sign in to comment.