-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.tf
37 lines (30 loc) · 1.02 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
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "rke2" {
name = var.cluster_name
location = var.location
}
resource "azurerm_virtual_network" "rke2" {
name = "${var.cluster_name}-vnet"
address_space = ["10.0.0.0/16"]
resource_group_name = azurerm_resource_group.rke2.name
location = azurerm_resource_group.rke2.location
}
resource "azurerm_subnet" "rke2" {
name = "${var.cluster_name}-snet"
resource_group_name = azurerm_resource_group.rke2.name
virtual_network_name = azurerm_virtual_network.rke2.name
address_prefixes = ["10.0.1.0/24"]
}
module "rke2" {
source = "../.."
cluster_name = var.cluster_name
subnet_id = azurerm_subnet.rke2.id
server_public_ip = var.server_public_ip
server_open_ssh_public = var.server_open_ssh_public
vm_size = var.vm_size
server_instance_count = var.server_instance_count
agent_instance_count = var.agent_instance_count
cloud = var.cloud
}