Fix kms encryption when kvsecretref is used
@@ -710,11 +710,12 @@ func getParameters(cs *api.ContainerService, isClassicMode bool, generatorCode s
properties.ServicePrincipalProfile.KeyvaultSecretRef.SecretVersion)
} else {
addValue(parametersMap, "servicePrincipalClientSecret", properties.ServicePrincipalProfile.Secret)
+ }
+
if properties.OrchestratorProfile.KubernetesConfig != nil && helpers.IsTrueBoolPointer(properties.OrchestratorProfile.KubernetesConfig.EnableEncryptionWithExternalKms) && !properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity && properties.ServicePrincipalProfile.ObjectID != "" {
addValue(parametersMap, "servicePrincipalObjectId", properties.ServicePrincipalProfile.ObjectID)
}
}
- }
if properties.AADProfile != nil {
addValue(parametersMap, "aadTenantId", properties.AADProfile.TenantID)
