This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
81 lines (63 loc) · 2.19 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
69
70
71
72
73
74
75
76
77
78
79
80
81
# Azure ACS Engine
resource "azurerm_container_service" "kubernetes-service" {
count = "${(contains(var.kube,lower(var.orchestration_platform))) ? 1 : 0 }"
name = "${var.cluster_name}"
location = "${var.azure_location}"
resource_group_name = "${var.resource_group_name}"
orchestration_platform = "${var.orchestration_platform}"
master_profile {
count = "${var.master_vm_count}"
dns_prefix = "master-${var.dns_prefix}"
}
linux_profile {
admin_username = "${var.admin_user}"
ssh_key {
key_data = "${var.ssh_key}"
}
}
agent_pool_profile {
name = "workers"
count = "${var.worker_vm_count}"
dns_prefix = "agent-${var.dns_prefix}"
vm_size = "${var.vm_size}"
}
service_principal {
client_id = "${var.azure_client_id}"
client_secret = "${var.azure_client_secret}"
}
diagnostics_profile {
enabled = "${var.diagnostics_profile_enabled}"
}
tags = "${merge(var.tags, map("Type", "Orchestration Technology",
"Environment","${var.deployment_profile}"))}"
depends_on = ["azurerm_subnet.default"]
}
resource "azurerm_container_service" "swarm-dcos-service" {
count = "${(contains(var.swarm-dcos,lower(var.orchestration_platform))) ? 1 : 0}"
name = "${var.cluster_name}"
location = "${var.azure_location}"
resource_group_name = "${var.resource_group_name}"
orchestration_platform = "${var.orchestration_platform}"
master_profile {
count = "${var.master_vm_count}"
dns_prefix = "master-${var.dns_prefix}"
}
linux_profile {
admin_username = "${var.admin_user}"
ssh_key {
key_data = "${var.ssh_key}"
}
}
agent_pool_profile {
name = "workers"
count = "${var.worker_vm_count}"
dns_prefix = "agent-${var.dns_prefix}"
vm_size = "${var.vm_size}"
}
diagnostics_profile {
enabled = "${var.diagnostics_profile_enabled}"
}
tags = "${merge(var.tags, map("Type", "Orchestration Technology",
"Environment","${var.deployment_profile}"))}"
depends_on = ["azurerm_subnet.default"]
}