forked from ExpediaGroup/apiary-data-lake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s-service-accounts.tf
35 lines (33 loc) · 1.13 KB
/
k8s-service-accounts.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
resource "kubernetes_service_account" "hms_readwrite" {
count = var.hms_instance_type == "k8s" ? 1 : 0
metadata {
name = "${local.hms_alias}-readwrite"
namespace = var.metastore_namespace
annotations = {
"eks.amazonaws.com/role-arn" = var.oidc_provider == "" ? "" : aws_iam_role.apiary_hms_readwrite.arn
}
}
automount_service_account_token = true
}
resource "kubernetes_service_account" "hms_readonly" {
count = var.hms_instance_type == "k8s" ? 1 : 0
metadata {
name = "${local.hms_alias}-readonly"
namespace = var.metastore_namespace
annotations = {
"eks.amazonaws.com/role-arn" = var.oidc_provider == "" ? "" : aws_iam_role.apiary_hms_readonly.arn
}
}
automount_service_account_token = true
}
resource "kubernetes_service_account" "s3_inventory" {
count = var.hms_instance_type == "k8s" ? 1 : 0
metadata {
name = "${local.instance_alias}-s3-inventory"
namespace = var.metastore_namespace
annotations = {
"eks.amazonaws.com/role-arn" = var.oidc_provider == "" ? "" : aws_iam_role.apiary_s3_inventory.arn
}
}
automount_service_account_token = true
}