Skip to content

Commit f2fea35

Browse files
committed
fix: remove incorrect sensitive flag from cluster_identity output
- Fix identity block in main.tf to use nonsensitive() function to prevent client_secret sensitivity from propagating to the identity block - Remove sensitive = true flag from cluster_identity output as the identity information (principal_id, tenant_id, type) is not actually sensitive data - Update NoticeOnUpgradeTov11.0.md to document this breaking change Fixes #683
1 parent 1656221 commit f2fea35

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

NoticeOnUpgradeTov11.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ This change also affects the `node_pools` variable where `node_pools[*].enable_h
1515
## `var.enable_node_public_ip` has been renamed to `var.node_public_ip_enabled`
1616

1717
This change also affects the `node_pools` variable where `node_pools[*].enable_node_public_ip` should be replaced with `node_pools[*].node_public_ip_enabled`.
18+
19+
## `cluster_identity` output is no longer marked as sensitive
20+
21+
The `cluster_identity` output was incorrectly marked as `sensitive = true` due to the `identity` block referencing `var.client_secret` in its `for_each` expression. This has been fixed by using the `nonsensitive()` function, and the output is no longer marked as sensitive.
22+
23+
**Impact**: Users who previously had to mark their outputs as sensitive when using `module.aks.cluster_identity` can now remove the `sensitive = true` flag from their outputs. The cluster identity information (principal_id, tenant_id, type) is not actually sensitive data.

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ resource "azurerm_kubernetes_cluster" "main" {
327327
}
328328
}
329329
dynamic "identity" {
330-
for_each = var.client_id == "" || var.client_secret == "" ? ["identity"] : []
330+
for_each = var.client_id == "" || nonsensitive(var.client_secret) == "" ? ["identity"] : []
331331

332332
content {
333333
type = var.identity_type

outputs.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ output "cluster_fqdn" {
100100

101101
output "cluster_identity" {
102102
description = "The `azurerm_kubernetes_cluster`'s `identity` block."
103-
sensitive = true
104103
value = try(azurerm_kubernetes_cluster.main.identity[0], null)
105104
}
106105

0 commit comments

Comments
 (0)