Skip to content

Commit

Permalink
Update package with base attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshumarwah committed Jul 24, 2020
1 parent 5b4a980 commit 8382329
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 53 deletions.
20 changes: 7 additions & 13 deletions modules/azure-kubernetes-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ resource "azurerm_kubernetes_cluster" "K8s" {
location = var.location
resource_group_name = var.resource_group_name
tags = var.tags
kubernetes_version = var.kubernetes_version
private_cluster_enabled = var.private_cluster_enabled
dns_prefix = var.dns_prefix

default_node_pool {
name = var.node_name
vm_size = var.vm_size
node_count = var.node_count
}

identity {
type = var.identity_type
}
Expand All @@ -26,21 +31,10 @@ resource "azurerm_kubernetes_cluster" "K8s" {

addon_profile {
oms_agent {
enabled = var.oms_agent_enabled
log_analytics_workspace_id = var.log_analytics_workspace_id
enabled = var.oms_agent_enabled
}
kube_dashboard {
enabled = var.kube_dashboard_enabled
}
}

default_node_pool {
name = var.node_name
vm_size = var.vm_size
enable_auto_scaling = var.enable_auto_scaling
node_count = var.node_count
vnet_subnet_id = var.vnet_subnet_id
os_disk_size_gb = var.os_disk_size_gb
tags = var.node_pool_tags
}
}
5 changes: 0 additions & 5 deletions modules/azure-kubernetes-cluster/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ output "id" {
value = azurerm_kubernetes_cluster.K8s.id
}

output "private_fqdn" {
description = "The FQDN for the Kubernetes Cluster when private link has been enabled, which is only resolvable inside the Virtual Network used by the Kubernetes Cluster."
value = azurerm_kubernetes_cluster.K8s.private_fqdn
}

output "kube_config" {
description = "A kube_config block as defined below."
value = azurerm_kubernetes_cluster.K8s.kube_config_raw
Expand Down
37 changes: 2 additions & 35 deletions modules/azure-kubernetes-cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ variable "dns_prefix" {
type = string
}

variable "kubernetes_version" {
description = "Version of Managed Kubernetes Cluster."
type = string
default = "1.16.10"
}

variable "private_cluster_enabled" {
description = "This is to expose API server to internal IP addresses only."
Expand All @@ -51,18 +46,13 @@ variable "network_plugin" {
variable "load_balancer_sku" {
description = "This is the sku for load balancer used for Kubernetes Cluster."
type = string
default = "Standard"
}

variable "log_analytics_workspace_id" {
description = "The ID of log analytics workspace for AKS self monitoring by Sentinel."
type = string
default = "standard"
}

variable "oms_agent_enabled" {
description = "This is to enable oms agent on AKS cluster for self monitoring by sentinel."
type = bool
default = true
default = false
}

variable "kube_dashboard_enabled" {
Expand All @@ -83,31 +73,8 @@ variable "vm_size" {
default = "Standard_DS1_v2"
}

variable "enable_auto_scaling" {
description = "This is to enable auto-scaling of nodes."
type = bool
default = false
}

variable "node_count" {
description = "The number of nodes required to be deployed."
type = number
default = 3
}

variable "vnet_subnet_id" {
description = "The subnet id inside vnet where aks cluster is to be deployed."
type = string
}

variable "os_disk_size_gb" {
description = "The size of os disk in gb."
type = string
default = "30"
}

variable "node_pool_tags" {
description = "A mapping of tags to assign to the nodes."
type = map(string)
default = {}
}

0 comments on commit 8382329

Please sign in to comment.