From 261f66a1c3a4e7a57fe69484f1c64a8abef1de04 Mon Sep 17 00:00:00 2001 From: Divyam Date: Tue, 8 Oct 2024 10:20:13 +0530 Subject: [PATCH] enable azure policy --- terraform/azure/aks/aks.tf | 1 + terraform/azure/aks/variables-aks.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/terraform/azure/aks/aks.tf b/terraform/azure/aks/aks.tf index f8c1fa87e..c0576fa64 100644 --- a/terraform/azure/aks/aks.tf +++ b/terraform/azure/aks/aks.tf @@ -115,6 +115,7 @@ resource "azurerm_kubernetes_cluster" "k8s" { private_cluster_public_fqdn_enabled = true sku_tier = var.sku_tier oidc_issuer_enabled = var.oidc_issuer_enabled + azure_policy_enabled = var.azure_policy_enabled default_node_pool { name = var.nodepool_name node_count = var.default_agent_count diff --git a/terraform/azure/aks/variables-aks.tf b/terraform/azure/aks/variables-aks.tf index 8071aca25..7dcaef813 100644 --- a/terraform/azure/aks/variables-aks.tf +++ b/terraform/azure/aks/variables-aks.tf @@ -289,3 +289,9 @@ variable "cluster_backup_endpoint_tenant_id" { default = null } + +variable "azure_policy_enabled" { + description = "value to enable or disable azure policy" + type = bool + default = false +} \ No newline at end of file