Skip to content

Commit

Permalink
DOM-45710 • Enable access to dev-aws-eks-dataplane (#98)
Browse files Browse the repository at this point in the history
* allow superuser to assume control over the cluster

* use unique names
  • Loading branch information
adp312 authored Jun 1, 2023
1 parent c35e45e commit 206c513
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion submodules/eks/iam.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
data "aws_iam_policy_document" "eks_cluster" {
statement {
sid = "EKSClusterAssumeRole"
sid = "EKSClusterAssumeRoleService"
actions = ["sts:AssumeRole"]

principals {
type = "Service"
identifiers = ["eks.${local.dns_suffix}"]
}
}
statement {
sid = "EKSClusterAssumeRoleUser"
actions = ["sts:AssumeRole"]

principals {
type = "AWS"
identifiers = ["arn:aws:iam::${local.aws_account_id}:root"]
}
}
}

resource "aws_iam_role" "eks_cluster" {
Expand Down

0 comments on commit 206c513

Please sign in to comment.