Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fcvm-fleet.tf
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,13 @@ resource "aws_iam_role_policy" "fcvm_fleet_coordinator_task" {
"arn:aws:autoscaling:${r}:${local.fcvm_fleet_account_id}:autoScalingGroup:*:autoScalingGroupName/${g}"]])
},
{
# Reading the groups' instances while waking. DescribeAutoScalingGroups takes no resource-level permission.
# Reading the groups' instances while they come up, and their scaling activities: a failed spot launch (Auto
# Scaling records UnfulfillableCapacity or MaxSpotInstanceCountExceeded about 10 s after the raise) moves the
# wake to the on-demand group at once instead of after --spot-wait (ejc3/fcvm#1263). Neither Describe takes a
# resource-level permission.
Sid = "DescribeTheHostGroups"
Effect = "Allow"
Action = "autoscaling:DescribeAutoScalingGroups"
Action = ["autoscaling:DescribeAutoScalingGroups", "autoscaling:DescribeScalingActivities"]
Resource = "*"
},
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-fcvm-fleet.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_the_coordinator_scales_only_the_host_groups(self):
self.assertIn('[for g in ["fcvm-fleet-hosts", "fcvm-fleet-hosts-on-demand"] :', s)
self.assertNotIn('Resource = "*"', s)
d = self.stmt("DescribeTheHostGroups")
self.assertIn('Action = "autoscaling:DescribeAutoScalingGroups"', d)
self.assertIn('Action = ["autoscaling:DescribeAutoScalingGroups", "autoscaling:DescribeScalingActivities"]', d)
self.assertNotRegex(self.TF, r'"autoscaling:\*"')
group = block('resource "aws_autoscaling_group" "hosts"', MOD)
self.assertIn("ignore_changes = [desired_capacity]", group)
Expand Down
Loading