-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
62 lines (47 loc) · 1.83 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
# File: main.tf; Mode: Terraform; Tab-width: 2; Author: Simon Flannery;
provider "azurerm" {
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
provider "rancher2" {
api_url = "https://${var.rancher_address}/"
insecure = true
bootstrap = length(var.rancher_version) > 0
token_key = length(var.rancher_version) > 0 ? null : var.rancher_token
}
module "cluster-support" {
source = ".\\modules\\cluster-support"
name = var.cluster_name
resource_location = var.resource_location
vnet_address_space = var.vnet_address_space
gateway_subnet_cidr = var.gateway_subnet_cidr
firewall_subnet_cidr = var.firewall_subnet_cidr
dmz_subnet_cidr = var.dmz_subnet_cidr
bastion_subnet_cidr = var.bastion_subnet_cidr
shared01_subnet_cidr = var.shared01_subnet_cidr
enable_bastion = var.enable_bastion
}
module "cluster" {
source = ".\\modules\\rke2-cluster"
depends_on = [ module.cluster-support ]
name = var.cluster_name
resource_location = var.resource_location
rancher_address = var.rancher_address
letsencrypt_email_address = var.letsencrypt_email_address
vnet_id = module.cluster-support.cluster_vnet_id
vnet_name = module.cluster-support.cluster_vnet_name
subnet_id = module.cluster-support.cluster_dmz_subnet_id
subnet_name = module.cluster-support.cluster_dmz_subnet_name
enable_server_public_ip = var.enable_server_public_ip
enable_server_public_ssh = var.enable_server_public_ssh
agent_vm_size = var.agent_vm_size
server_vm_size = var.server_vm_size
server_instance_count = var.server_instance_count
agent_instance_count = var.agent_instance_count
rke2_version = var.rke2_version
rancher_version = var.rancher_version
register_cluster = var.register_cluster
}