diff --git a/.gitignore b/.gitignore index 6ea2ad7a..6fd55cfe 100644 --- a/.gitignore +++ b/.gitignore @@ -356,4 +356,5 @@ deploy/clouds/digital-ocean/.terraform/providers/registry.terraform.io deploy/clouds/digital-ocean/terraform.tfstate deploy/clouds/digital-ocean/.terraform.lock.hcl .terraform.lock.hcl -.terraform \ No newline at end of file +.terraform +deploy/k8s/.terraform.tfstate.lock.info diff --git a/deploy/k8s/k8s-cluster.tf b/deploy/k8s/k8s-cluster.tf index ffc20059..471175fc 100644 --- a/deploy/k8s/k8s-cluster.tf +++ b/deploy/k8s/k8s-cluster.tf @@ -1,4 +1,21 @@ resource "azurerm_kubernetes_cluster" "k8s" { + name = var.aks_cluster_name resource_group_name = var.aks_group_name location = var.aks_group_location + dns_prefix = var.aks_dns_prefix + + default_node_pool { + name = "system" + node_count = var.aks_node_count + vm_size = var.aks_vm_size + enable_auto_scaling = false + } + identity { + type = "SystemAssigned" + } + + tags = { + Environment = "Production" + Product = "O2NextGen Platform" + } } diff --git a/deploy/k8s/terraform.tfvars b/deploy/k8s/terraform.tfvars index a01bb542..630dad96 100644 --- a/deploy/k8s/terraform.tfvars +++ b/deploy/k8s/terraform.tfvars @@ -1,2 +1,7 @@ +aks_cluster_name = "o2nextgen-aks" aks_group_name = "aks-prods" aks_group_location = "WestUS3" +aks_dns_prefix = "o2ngaks" +aks_vm_size = "Standard_D2_v2" +aks_node_count = 1 + diff --git a/deploy/k8s/varribles.tf b/deploy/k8s/varribles.tf index 6bb16f82..54859a96 100644 --- a/deploy/k8s/varribles.tf +++ b/deploy/k8s/varribles.tf @@ -2,7 +2,27 @@ variable "aks_group_name" { type = string description = "Resourse group for AKS cluster" } + variable "aks_group_location" { type = string description = "Resourse group location for AKS cluster" } + +variable "aks_dns_prefix" { + type = string + description = "DNS prefix for AKS Cluster" +} + +variable "aks_vm_size" { + type = string + description = "Name VM for AKS Cluster" +} + +variable "aks_node_count" { + type = number + description = "Node count for AKS Cluster" +} +variable "aks_cluster_name" { + type = string + description = "AKS Cluster Name" +}