Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure Policy Add-On for AKS #389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/azure_aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resource "azurerm_kubernetes_cluster" "aks" {
role_based_access_control_enabled = true
http_application_routing_enabled = false
disk_encryption_set_id = var.aks_node_disk_encryption_set_id
azure_policy_enabled = var.aks_azure_policy_enabled

# https://docs.microsoft.com/en-us/azure/aks/supported-kubernetes-versions
# az aks get-versions --location eastus -o table
Expand Down
6 changes: 6 additions & 0 deletions modules/azure_aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ variable "aks_node_disk_encryption_set_id" {
default = null
}

variable "aks_azure_policy_enabled" {
description = "Enables the Azure Policy Add-On for Azure Kubernetes Service."
type = bool
default = false
}

variable "kubernetes_version" {
description = "The AKS cluster K8s version"
type = string
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ variable "aks_node_disk_encryption_set_id" {
default = null
}

variable "aks_azure_policy_enabled" {
description = "Enables the Azure Policy Add-On for Azure Kubernetes Service."
type = bool
default = false
}

# AKS advanced network config
variable "aks_network_plugin" {
description = "Network plugin to use for networking. Currently supported values are azure and kubenet. Changing this forces a new resource to be created."
Expand Down