Destroying cluster causes some issues with removing policies (#196)

* Destroying cluster causes some issues with removing policies

use the force detach

https://www.terraform.io/docs/providers/aws/r/iam_role.html#force_detach_policies

* Destroying cluster causes some issues with removing policies

* formatting

* Destroying cluster causes some issues with removing policies

* CHANGELOG
This commit is contained in:
mark kelly
2018-11-23 13:33:02 +00:00
committed by Max Williams
parent 8d3dd6392f
commit cddac92757
3 changed files with 7 additions and 4 deletions

View File

@@ -105,8 +105,9 @@ resource "aws_security_group_rule" "workers_ingress_cluster_https" {
}
resource "aws_iam_role" "workers" {
name_prefix = "${aws_eks_cluster.this.name}"
assume_role_policy = "${data.aws_iam_policy_document.workers_assume_role_policy.json}"
name_prefix = "${aws_eks_cluster.this.name}"
assume_role_policy = "${data.aws_iam_policy_document.workers_assume_role_policy.json}"
force_detach_policies = true
}
resource "aws_iam_instance_profile" "workers" {