Skip to content

Commit

Permalink
Merge pull request #14 from getndazn/PLAT-4678/perms-for-set-instance…
Browse files Browse the repository at this point in the history
…-health

Allow instances to kill themselves via ASG custom health check
  • Loading branch information
TomNorth authored Jul 9, 2020
2 parents b20f4c3 + 3a55d5a commit 7d854d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- type: added
m: Allow instances to set themselves as unhealthy so that Autoscaling can kill them.
jira: PLAT-4678
owner: tomnorth
11 changes: 11 additions & 0 deletions iam_child.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ data "aws_iam_policy_document" "bastion_service_assume_role_in_parent" {
var.assume_role_arn,
]
}

# Allow instances to mark themselves unhealthy
statement {
effect = "Allow"

actions = [
"autoscaling:SetInstanceHealth"
]

resources = ["*"]
}
}

resource "aws_iam_policy" "bastion_service_assume_role_in_parent" {
Expand Down

0 comments on commit 7d854d0

Please sign in to comment.