Skip to content

Commit

Permalink
Merge pull request #8 from quantum-sec/feature/EN-975
Browse files Browse the repository at this point in the history
EN-975: update RBAC configuration
  • Loading branch information
deepanshumarwah authored Aug 16, 2022
2 parents f869e7e + 4da604a commit 2ea4cdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
9 changes: 2 additions & 7 deletions modules/azure-kubernetes-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
required_version = ">= 0.12"
}

resource "azurerm_kubernetes_cluster" "cluster" {
resource "azurerm_kubernetes_cluster" "cluster" { # tfsec:ignore:AZU007
name = var.name
location = var.location
resource_group_name = var.resource_group_name
Expand All @@ -15,17 +15,12 @@ resource "azurerm_kubernetes_cluster" "cluster" {
kubernetes_version = var.kubernetes_version
private_cluster_enabled = var.private_cluster_enabled
dns_prefix = var.dns_prefix
role_based_access_control_enabled = var.rbac_enabled
role_based_access_control_enabled = var.role_based_access_control_enabled

identity {
type = var.identity_type
}

azure_active_directory_role_based_access_control { # tfsec:ignore:AZU007
admin_group_object_ids = var.rbac_aad_admin_group_object_ids
azure_rbac_enabled = var.rbac_aad_azure_rbac_enabled
managed = true
}

network_profile {
network_plugin = var.network_plugin
Expand Down
14 changes: 1 addition & 13 deletions modules/azure-kubernetes-cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ variable "identity_type" {
default = "SystemAssigned"
}

variable "rbac_enabled" {
variable "role_based_access_control_enabled" {
description = "Whether or not RBAC is enabled for this cluster."
type = bool
default = true
Expand Down Expand Up @@ -128,15 +128,3 @@ variable "api_server_authorized_ip_ranges" {
type = list(string)
default = ["0.0.0.0/0"]
}

variable "rbac_aad_admin_group_object_ids" {
description = "value"
type = list(string)
default = []
}

variable "rbac_aad_azure_rbac_enabled" {
description = "value"
type = bool
default = true
}

0 comments on commit 2ea4cdd

Please sign in to comment.