-
Notifications
You must be signed in to change notification settings - Fork 8
/
main.tf
39 lines (33 loc) · 1.26 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
terraform {
required_version = ">= 0.12"
}
resource "azurerm_availability_set" "managers" {
name = "${var.cluster_name}-${var.environment}-${var.name_suffix}-managers"
location = data.azurerm_resource_group.main.location
resource_group_name = data.azurerm_resource_group.main.name
managed = true
platform_fault_domain_count = 2
}
resource "azurerm_availability_set" "workers" {
name = "${var.cluster_name}-${var.environment}-${var.name_suffix}-workers"
location = data.azurerm_resource_group.main.location
resource_group_name = data.azurerm_resource_group.main.name
managed = true
platform_fault_domain_count = 2
}
data "azurerm_resource_group" "main" {
name = var.main_resource_group
}
data "azurerm_subnet" "subnet" {
name = var.subnet_name
virtual_network_name = var.vnet_name
resource_group_name = data.azurerm_resource_group.main.name
}
data "azurerm_image" "k8s" {
name = var.k8s_image_name
resource_group_name = var.images_resource_group
}
data "azurerm_image" "bastion" {
name = var.bastion_image_name
resource_group_name = var.images_resource_group
}