Skip to content

Commit

Permalink
AKs cluster creation module check
Browse files Browse the repository at this point in the history
  • Loading branch information
githubofkrishnadhas committed Dec 27, 2024
1 parent 29ab4ef commit add175e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aks/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
backend "azurerm" {
resource_group_name = "ARCHITECTS-STORAGE-RG" # Replace with your resource group name
storage_account_name = "techarchitectssa" # Replace with your storage account name
container_name = "tfstatefiles" # Replace with your container name
key = "devwithkrishna-kubernetes.tfstate" # This is the name of the state file
}
}
37 changes: 37 additions & 0 deletions aks/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module "aks" {
source = "git::https://github.com/devwithkrishna/azure-terraform-modules.git//vmss-linux?ref=feature/kubernetes-cluster"

# Optional variables
application_name = "devwithkrishna"
environment = "DEV"
temporary = "TRUE"
location = "centralindia"
resource_group_name = "DEVWITHKRISHNA-AKS-RG"
aks_node_resource_group_name = "DEVWITHKRISHNA-AKS-NODEPOOL-RG"
aks_cluster_name = "DEVWITHKRISHNA-NONPROD"
default_nodepool_sku = "Standard_D2ps_v5"
default_nodepool_name = "agentpool"
default_nodepool_max_count = 2
cluster_admin_group_names = ["Tech-Architects-Group"]
max_pods_per_node = 90
network_plugin = "azure"
network_policy = "azure"
network_plugin_mode = "overlay"
pod_cidr_range = "172.0.0.0/16"
virtual_network_name = "ARCHITECTS-CENTRAL-INDIA-AKS-VNET"
ARCHITECTS-CENTRAL-INDIA-AKS-VNET = "ARCHITECTS-CENTRAL-INDIA-AKS-VNET-SUBNET-0"
service_cidr_subnet_name = "192.168.0.0/16"
virtual_netwok_rg = "ARCHITECTS-CENTRAL-INDIA-AKS-VNET-RG"
load_balancer_sku = "basic"
workload_identity_enabled = true
kubernetes_sku_tier = "Free"
private_cluster = false
worker_nodepool_name = "workerpool"
worker_nodepool_sku = "Standard_D2ads_v5"
worker_node_spot = true
node_public_ip_enabled = false
worker_nodepool_max_count = 5
worker_nodepool_min_count= 1
worker_nodepool_mode = "User"
kubernetes_version = "1.30.4"
}
9 changes: 9 additions & 0 deletions aks/output.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "aks_cluster_name" {
value = module.aks.aks_cluster_name
description = "Aks cluster name"
}

output "aks_cluster_control_plane_url" {
value = module.aks.aks_cluster_control_plane_url
description = "AKS control plane url"
}

0 comments on commit add175e

Please sign in to comment.