-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
72 lines (48 loc) · 2.09 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
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.aad_client_id}"
client_secret = "${var.aad_client_secret}"
tenant_id = "${var.tenant_id}"
}
resource "azurerm_resource_group" "rg" {
name = "${var.resource_group_name}"
location = "${var.resource_group_location}"
}
# ******* AVAILABILITY SETS ***********
resource "azurerm_availability_set" "master" {
name = "masteravailabilityset"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
}
resource "azurerm_availability_set" "infra" {
name = "infraavailabilityset"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
}
resource "azurerm_availability_set" "node" {
name = "nodeavailabilityset"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
}
# ******* IP ADDRESSES ***********
resource "azurerm_public_ip" "bastion_pip" {
name = "bastionpip"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
public_ip_address_allocation = "Static"
domain_name_label = "${var.openshift_cluster_prefix}-bastion"
}
resource "azurerm_public_ip" "openshift_master_pip" {
name = "masterpip"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
public_ip_address_allocation = "Static"
domain_name_label = "${var.openshift_cluster_prefix}"
}
resource "azurerm_public_ip" "infra_lb_pip" {
name = "infraip"
resource_group_name = "${azurerm_resource_group.rg.name}"
location = "${azurerm_resource_group.rg.location}"
public_ip_address_allocation = "Static"
domain_name_label = "${var.openshift_cluster_prefix}infrapip"
}