File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -350,8 +350,11 @@ resource "aws_iam_policy" "instance_docker_machine_policy" {
350350 name = " ${ local . name_iam_objects } -docker-machine"
351351 path = " /"
352352 description = " Policy for docker machine."
353- policy = templatefile (" ${ path . module } /policies/instance-docker-machine-policy.json" , {})
354- tags = local. tags
353+ policy = templatefile (" ${ path . module } /policies/instance-docker-machine-policy.json" ,
354+ {
355+ docker_machine_role_arn = aws_iam_role.docker_machine.arn
356+ })
357+ tags = local. tags
355358}
356359
357360resource "aws_iam_role_policy_attachment" "instance_docker_machine_policy" {
Original file line number Diff line number Diff line change 1717 " ec2:RequestSpotInstances" ,
1818 " ec2:CancelSpotInstanceRequests" ,
1919 " ec2:DescribeSubnets" ,
20- " ec2:AssociateIamInstanceProfile" ,
21- " iam:PassRole"
20+ " ec2:AssociateIamInstanceProfile"
2221 ],
2322 "Effect" : " Allow" ,
2423 "Resource" : " *"
24+ },
25+ {
26+ "Action" : [
27+ " iam:PassRole"
28+ ],
29+ "Effect" : " Allow" ,
30+ "Resource" : " ${docker_machine_role_arn}"
2531 }
2632 ]
2733 }
You can’t perform that action at this time.
0 commit comments