File tree 2 files changed +13
-4
lines changed
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" {
350
350
name = " ${ local . name_iam_objects } -docker-machine"
351
351
path = " /"
352
352
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
355
358
}
356
359
357
360
resource "aws_iam_role_policy_attachment" "instance_docker_machine_policy" {
Original file line number Diff line number Diff line change 17
17
" ec2:RequestSpotInstances" ,
18
18
" ec2:CancelSpotInstanceRequests" ,
19
19
" ec2:DescribeSubnets" ,
20
- " ec2:AssociateIamInstanceProfile" ,
21
- " iam:PassRole"
20
+ " ec2:AssociateIamInstanceProfile"
22
21
],
23
22
"Effect" : " Allow" ,
24
23
"Resource" : " *"
24
+ },
25
+ {
26
+ "Action" : [
27
+ " iam:PassRole"
28
+ ],
29
+ "Effect" : " Allow" ,
30
+ "Resource" : " ${docker_machine_role_arn}"
25
31
}
26
32
]
27
33
}
You can’t perform that action at this time.
0 commit comments