Skip to content

Commit 81aa121

Browse files
authored
fix: correctly output key vault secrets provider & handle null addon config (#155)
* fix: correctly output key vault secrets provider & handle null addon config * fix(example): remove istio * pre-commit
1 parent e622ae2 commit 81aa121

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

examples/default/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ module "default" {
112112
}
113113
sku = {
114114
tier = "Standard"
115+
name = "Base"
115116
}
116117
}
117118
```

examples/default/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,6 @@ module "default" {
105105
}
106106
sku = {
107107
tier = "Standard"
108+
name = "Base"
108109
}
109110
}

locals.addon_profiles.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ locals {
2121
var.addon_profile_ingress_application_gateway != null ? {
2222
ingressApplicationGateway = {
2323
enabled = var.addon_profile_ingress_application_gateway.enabled
24-
config = tomap({
24+
config = var.addon_profile_ingress_application_gateway.config != null ? tomap({
2525
applicationGatewayId = var.addon_profile_ingress_application_gateway.config.application_gateway_id
2626
applicationGatewayName = var.addon_profile_ingress_application_gateway.config.application_gateway_name
2727
subnetCIDR = var.addon_profile_ingress_application_gateway.config.subnet_cidr
2828
subnetId = var.addon_profile_ingress_application_gateway.config.subnet_id
29-
})
29+
}) : null
3030
}
3131
} : null,
3232
!local.is_automatic && var.addon_profile_key_vault_secrets_provider != null ? {
3333
azureKeyvaultSecretsProvider = {
3434
enabled = true
35-
config = tomap({
35+
config = var.addon_profile_key_vault_secrets_provider.config != null ? tomap({
3636
enableSecretRotation = var.addon_profile_key_vault_secrets_provider.config.enable_secret_rotation
3737
rotationPollInterval = var.addon_profile_key_vault_secrets_provider.config.rotation_poll_interval
38-
})
38+
}) : null
3939
}
4040
} : null,
4141
var.addon_profile_confidential_computing != null ? {

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ resource "azapi_resource" "this" {
1313
"properties.agentPoolProfiles[0].vnetSubnetID",
1414
]
1515
response_export_values = [
16+
"properties.addonProfiles.azureKeyvaultSecretsProvider",
1617
"properties.currentKubernetesVersion",
1718
"properties.fqdn",
1819
"properties.identityProfile.kubeletidentity",

0 commit comments

Comments
 (0)