-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccess.tf
More file actions
31 lines (24 loc) · 803 Bytes
/
access.tf
File metadata and controls
31 lines (24 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resource "aws_eks_access_entry" "self" {
cluster_name = aws_eks_cluster.this.name
principal_arn = local.self_arn
}
resource "aws_eks_access_policy_association" "self_admin" {
cluster_name = aws_eks_cluster.this.name
principal_arn = local.self_arn
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
access_scope {
type = "cluster"
}
}
resource "aws_eks_access_entry" "ns_agent" {
cluster_name = aws_eks_cluster.this.name
principal_arn = local.ns_agent_user_arn
}
resource "aws_eks_access_policy_association" "ns_agent_admin" {
cluster_name = aws_eks_cluster.this.name
principal_arn = local.ns_agent_user_arn
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
access_scope {
type = "cluster"
}
}