-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
54 lines (43 loc) · 1.62 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
module "bootstrap" {
source = "./modules/bootstrap"
}
module "resource_group" {
source = "./modules/resourceGroup"
}
module "log_analytics_workspace" {
source = "./modules/logAnalyticsWorkspace"
location = module.resource_group.location
resource_group_name = module.resource_group.name
depends_on = [module.bootstrap, module.resource_group]
}
module "cluster" {
source = "./modules/cluster"
location = module.resource_group.location
resource_group_name = module.resource_group.name
workspace_id = module.log_analytics_workspace.id
depends_on = [module.bootstrap, module.resource_group, module.log_analytics_workspace]
}
provider "kubernetes" {
host = module.cluster.host
client_certificate = base64decode(module.cluster.client_certificate)
client_key = base64decode(module.cluster.client_key)
cluster_ca_certificate = base64decode(module.cluster.cluster_ca_certificate)
}
provider "helm" {
kubernetes {
host = module.cluster.host
client_certificate = base64decode(module.cluster.client_certificate)
client_key = base64decode(module.cluster.client_key)
cluster_ca_certificate = base64decode(module.cluster.cluster_ca_certificate)
}
}
module "kubernetes" {
source = "./modules/kubernetes"
node_name = module.cluster.node_name
depends_on = [module.bootstrap, module.cluster]
}
module "frontdoor" {
source = "./modules/frontdoor"
resource_group_name = module.resource_group.name
depends_on = [module.bootstrap, module.resource_group, module.kubernetes]
}