Skip to content

Commit 75f21f9

Browse files
authored
Revert "Restrict autoscaling privileges to AWSBatch* resources (#12)" (#19)
This reverts commit ca3d5d3.
1 parent 9d7b34b commit 75f21f9

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

modules/computation/iam-batch-execution.tf

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,16 @@ data "aws_iam_policy_document" "custom_access_policy" {
7575
"autoscaling:DescribeAutoScalingGroups",
7676
"autoscaling:DescribeLaunchConfigurations",
7777
"autoscaling:DescribeAutoScalingInstances",
78+
"autoscaling:CreateLaunchConfiguration",
79+
"autoscaling:CreateAutoScalingGroup",
80+
"autoscaling:UpdateAutoScalingGroup",
81+
"autoscaling:SetDesiredCapacity",
82+
"autoscaling:DeleteLaunchConfiguration",
83+
"autoscaling:DeleteAutoScalingGroup",
7884
"autoscaling:CreateOrUpdateTags",
85+
"autoscaling:SuspendProcesses",
86+
"autoscaling:PutNotificationConfiguration",
87+
"autoscaling:TerminateInstanceInAutoScalingGroup",
7988
"ecs:DescribeClusters",
8089
"ecs:DescribeContainerInstances",
8190
"ecs:DescribeTaskDefinition",
@@ -108,37 +117,6 @@ data "aws_iam_policy_document" "custom_access_policy" {
108117
"*"
109118
]
110119
}
111-
112-
statement {
113-
actions = [
114-
"autoscaling:CreateLaunchConfiguration",
115-
"autoscaling:DeleteLaunchConfiguration",
116-
]
117-
118-
effect = "Allow"
119-
120-
resources = [
121-
"arn:aws:autoscaling:*:*:launchConfiguration:*:launchConfigurationName/AWSBatch*"
122-
]
123-
}
124-
125-
statement {
126-
actions = [
127-
"autoscaling:CreateAutoScalingGroup",
128-
"autoscaling:UpdateAutoScalingGroup",
129-
"autoscaling:SetDesiredCapacity",
130-
"autoscaling:DeleteAutoScalingGroup",
131-
"autoscaling:SuspendProcesses",
132-
"autoscaling:PutNotificationConfiguration",
133-
"autoscaling:TerminateInstanceInAutoScalingGroup",
134-
]
135-
136-
effect = "Allow"
137-
138-
resources = [
139-
"arn:aws:autoscaling:*:*:autoScalingGroup:*:autoScalingGroupName/AWSBatch*"
140-
]
141-
}
142120
}
143121

144122
data "aws_iam_policy_document" "iam_custom_policies" {

0 commit comments

Comments
 (0)