Skip to content

Commit

Permalink
Added role_based_access_control_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrushuk committed Jun 3, 2022
1 parent 178aea5 commit 32a2ff6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 8 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ resource "azuread_group" "aks_admins" {

# https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster
resource "azurerm_kubernetes_cluster" "aks" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
dns_prefix = var.name
kubernetes_version = var.kubernetes_version
sku_tier = var.sla_sku
name = var.name
location = var.location
resource_group_name = var.resource_group_name
dns_prefix = var.name
kubernetes_version = var.kubernetes_version
sku_tier = var.sla_sku
role_based_access_control_enabled = var.role_based_access_control_enabled
tags = var.tags

default_node_pool {
name = local.default_node_pool.name
Expand Down Expand Up @@ -117,8 +119,6 @@ resource "azurerm_kubernetes_cluster" "aks" {
dns_service_ip = "10.0.0.10"
docker_bridge_cidr = "172.17.0.1/16"
}

tags = var.tags
}

# Add role to access AKS Resource View
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ variable "aad_auth_enabled" {
variable "azure_policy_enabled" {
description = "Should Azure Policy be enabled"
type = bool
default = false
default = true
}

variable "role_based_access_control_enabled" {
description = "(Optional) - Whether Role Based Access Control for the Kubernetes Cluster should be enabled."
type = bool
default = true
}

variable "log_analytics_workspace_id" {
Expand Down

0 comments on commit 32a2ff6

Please sign in to comment.