From 1b33787f2cea29a3192057b68db18b6a0242b41f Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Thu, 5 Sep 2024 14:53:03 +0100 Subject: [PATCH 1/2] Correctly set hasSettings value - Include AzureAuthEnabled - Include CustomCloudsConfig --- azsettings/settings.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azsettings/settings.go b/azsettings/settings.go index 117e65f..4a02f6e 100644 --- a/azsettings/settings.go +++ b/azsettings/settings.go @@ -61,8 +61,10 @@ func ReadFromContext(ctx context.Context) (*AzureSettings, bool) { return settings, false } + hasSettings := false if v := cfg.Get(AzureAuthEnabled); v == strconv.FormatBool(true) { settings.AzureAuthEnabled = true + hasSettings = true } if customCloudsJSON := cfg.Get(AzureCustomCloudsConfig); customCloudsJSON != "" { @@ -70,9 +72,11 @@ func ReadFromContext(ctx context.Context) (*AzureSettings, bool) { if err := settings.SetCustomClouds(customCloudsJSON); err != nil { backend.Logger.Error("Error setting custom clouds: %w", err) } + if settings.CustomCloudListJSON != "" { + hasSettings = true + } } - hasSettings := false if v := cfg.Get(AzureCloud); v != "" { settings.Cloud = v hasSettings = true From dc5d2b54c53f5ad1d8210508dfecf1775bd7fa1a Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Thu, 5 Sep 2024 14:53:40 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c2bd27..338679d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## v2.1.2 + +- Dependency updates +- Fix bug where `AzureAuthEnabled` setting was not correctly picked up from context + ## v2.1.1 - Dependency updates