Skip to content

Commit

Permalink
Added load_balancer_sku, defaulted to Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrushuk committed Feb 23, 2021
1 parent f203d48 commit 5f7cf81
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ resource "azurerm_kubernetes_cluster" "aks" {

# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster#network_plugin
network_profile {
load_balancer_sku = "Standard"
load_balancer_sku = var.load_balancer_sku
outbound_type = "loadBalancer"
network_plugin = "azure"
network_policy = "azure"
Expand All @@ -155,9 +155,9 @@ resource "azurerm_kubernetes_cluster" "aks" {
# Add role to access AKS Resource View
# https://docs.microsoft.com/en-us/azure/aks/kubernetes-portal
resource "azurerm_role_assignment" "aks_portal_resource_view" {
principal_id = azuread_group.aks_admins[0].id
role_definition_name = "Azure Kubernetes Service RBAC Cluster Admin"
scope = azurerm_kubernetes_cluster.aks.id
principal_id = azuread_group.aks_admins[0].id
role_definition_name = "Azure Kubernetes Service RBAC Cluster Admin"
scope = azurerm_kubernetes_cluster.aks.id
}


Expand Down
2 changes: 1 addition & 1 deletion test/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Test AKS module
provider "azurerm" {
version = "2.46.1"
version = "2.47.0"
features {}
}

Expand Down
34 changes: 20 additions & 14 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ variable "sla_sku" {
default = "Free"
}

variable "load_balancer_sku" {
description = "Specifies the SKU of the Load Balancer used for this Kubernetes Cluster"
type = string
default = "Basic"
}

variable "tags" {
description = "A map of the tags to use on the resources"
type = map(string)
Expand All @@ -57,20 +63,20 @@ variable "default_node_pool" {
Default node pool configuration. Overrides/merges with locals.default_agent_profile:
```
map(object({
name = string
count = number
vm_size = string
os_type = string
availability_zones = list(number)
enable_auto_scaling = bool
min_count = number
max_count = number
type = string
node_taints = list(string)
vnet_subnet_id = string
max_pods = number
os_disk_size_gb = number
enable_node_public_ip = bool
name = string
count = number
vm_size = string
os_type = string
availability_zones = list(number)
enable_auto_scaling = bool
min_count = number
max_count = number
type = string
node_taints = list(string)
vnet_subnet_id = string
max_pods = number
os_disk_size_gb = number
enable_node_public_ip = bool
}))
```
EOD
Expand Down

0 comments on commit 5f7cf81

Please sign in to comment.