-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
68 lines (59 loc) · 2.24 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
provider "aws" {
region = local.region
}
provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}
provider "helm" {
kubernetes {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
token = data.aws_eks_cluster_auth.this.token
}
}
provider "kubectl" {
apply_retry_count = 30
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
load_config_file = false
token = data.aws_eks_cluster_auth.this.token
}
# ECR always authenticates with `us-east-1` region
# Docs -> https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html
provider "aws" {
alias = "ecr"
region = "us-east-1"
}
data "aws_availability_zones" "available" {}
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
data "aws_partition" "current" {}
data "aws_ecrpublic_authorization_token" "token" {
provider = aws.ecr
}
data "aws_eks_cluster_auth" "this" {
name = module.eks.cluster_name
}
#---------------------------------------------------------------
# Local variables
#---------------------------------------------------------------
locals {
name = var.name
region = var.region
azs = slice(data.aws_availability_zones.available.names, 0, 2)
dolphinscheduler_name = "dolphinscheduler"
dolphinscheduler_namespace = "dolphinscheduler"
dolphinscheduler_master_service_account = "dolphinscheduler-masterserver"
dolphinscheduler_worker_service_account = "dolphinscheduler-workerserver"
dolphinscheduler_zookeeper_service_account = "dolphinscheduler-zookeeper"
dolphinscheduler_alert_service_account = "dolphinscheduler-alertserver"
dolphinscheduler_api_service_account = "dolphinscheduler-apiserver"
efs_storage_class = "efs-sc"
efs_pvc = "dolphinscheduler-pvc"
tags = {
Blueprint = local.name
GithubRepo = "github.com/awslabs/data-on-eks"
}
}