mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-18 17:47:31 +01:00
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:
@@ -11,6 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- `suspended_processes` to `worker_groups` input (by @bkmeneguello)
|
||||
- `target_group_arns` to `worker_groups` input (by @zihaoyu)
|
||||
- `force_detach_policies` to `aws_iam_role` `cluster` and `workers` (by @marky-mark)
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -50,8 +50,9 @@ resource "aws_security_group_rule" "cluster_https_worker_ingress" {
|
||||
}
|
||||
|
||||
resource "aws_iam_role" "cluster" {
|
||||
name_prefix = "${var.cluster_name}"
|
||||
assume_role_policy = "${data.aws_iam_policy_document.cluster_assume_role_policy.json}"
|
||||
name_prefix = "${var.cluster_name}"
|
||||
assume_role_policy = "${data.aws_iam_policy_document.cluster_assume_role_policy.json}"
|
||||
force_detach_policies = true
|
||||
}
|
||||
|
||||
resource "aws_iam_role_policy_attachment" "cluster_AmazonEKSClusterPolicy" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user