forked from smoleyxd/RCOS-Cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
49 lines (45 loc) · 1.5 KB
/
main.tf
File metadata and controls
49 lines (45 loc) · 1.5 KB
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
data "azurerm_resource_group" "rg" {
name = "RCOS-Cilium_group"
}
resource "azurerm_virtual_network" "vnet" {
name = "test-vnet"
address_space = ["10.0.0.0/8"]
location = var.RESOURCE_GROUP_LOCATION
resource_group_name = data.azurerm_resource_group.rg.name
}
resource "azurerm_subnet" "subnet" {
name = "test-subnet"
address_prefixes = ["10.240.0.0/16"]
resource_group_name = data.azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.vnet.name
}
resource "azurerm_subnet" "podsubnet" {
name = "pod-subnet"
resource_group_name = data.azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.vnet.name
address_prefixes = ["10.241.0.0/16"]
}
resource "azurerm_kubernetes_cluster" "default" {
name = "test-cilium-aks"
location = var.RESOURCE_GROUP_LOCATION
resource_group_name = data.azurerm_resource_group.rg.name
dns_prefix = "test-cilum-k8s"
kubernetes_version = "1.29.4"
default_node_pool {
name = "default"
node_count = 1
vm_size = "Standard_A2_v2"
os_disk_size_gb = 30
vnet_subnet_id = azurerm_subnet.subnet.id
pod_subnet_id = azurerm_subnet.podsubnet.id
}
service_principal {
client_id = var.CLIENT_ID
client_secret = var.CLIENT_SECRET
}
role_based_access_control_enabled = true
network_profile {
network_plugin = "azure"
ebpf_data_plane = "cilium"
}
}