Skip to content

Commit 3130378

Browse files
committed
1 parent 73bacc2 commit 3130378

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ resource "azurerm_kubernetes_cluster" "main" {
116116
}
117117
}
118118

119+
dynamic "key_vault_secrets_provider" {
120+
for_each = var.key_vault_secrets_provider_enabled ? ["key_vault_secrets_provider"] : []
121+
content {
122+
secret_rotation_enabled = var.secret_rotation_enabled
123+
secret_rotation_interval = var.secret_rotation_interval
124+
}
125+
}
126+
119127
role_based_access_control_enabled = var.enable_role_based_access_control
120128

121129
dynamic "azure_active_directory_role_based_access_control" {

variables.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,24 @@ variable "oidc_issuer_enabled" {
356356
type = bool
357357
default = false
358358
}
359+
360+
variable "key_vault_secrets_provider_enabled" {
361+
description = "(Optional) Whether to use the Azure Key Vault Provider for Secrets Store CSI Driver in an AKS cluster. For more details: https://docs.microsoft.com/en-us/azure/aks/csi-secrets-store-driver"
362+
type = bool
363+
default = false
364+
nullable = false
365+
}
366+
367+
variable "secret_rotation_enabled" {
368+
description = "Is secret rotation enabled? This variable is only used when enable_key_vault_secrets_provider is true and defaults to false"
369+
type = bool
370+
default = false
371+
nullable = false
372+
}
373+
374+
variable "secret_rotation_interval" {
375+
description = "The interval to poll for secret rotation. This attribute is only set when secret_rotation is true and defaults to 2m"
376+
type = string
377+
default = "2m"
378+
nullable = false
379+
}

0 commit comments

Comments
 (0)