-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11-helm-appmesh-controller.tf
52 lines (42 loc) · 1.32 KB
/
11-helm-appmesh-controller.tf
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Deploy to existing EKS cluster
# provider "helm" {
# kubernetes {
# config_path = "~/.kube/config"
# }
# }
data "aws_eks_cluster" "eks" {
name = "${local.env}-${local.eks_name}"
depends_on = [aws_eks_cluster.eks]
}
data "aws_eks_cluster_auth" "eks" {
name = "${local.env}-${local.eks_name}"
depends_on = [aws_eks_cluster.eks]
}
provider "helm" {
kubernetes {
host = data.aws_eks_cluster.eks.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.eks.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.eks.token
}
}
resource "helm_release" "appmesh_controller" {
name = "appmesh-controller"
repository = "https://aws.github.io/eks-charts"
chart = "appmesh-controller"
namespace = "appmesh-system"
create_namespace = true
version = "1.12.3"
set {
name = "serviceAccount.name"
value = "appmesh-controller"
}
set {
name = "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = aws_iam_role.appmesh_controller.arn
}
depends_on = [
aws_eks_node_group.general,
aws_iam_role_policy_attachment.aws_cloud_map_full_access_controller,
aws_iam_role_policy_attachment.aws_appmesh_full_access_controller
]
}