From 434ee10bfa928bbf10730b626f36e37a9898df41 Mon Sep 17 00:00:00 2001 From: Francisco Augusto Date: Mon, 29 May 2023 11:40:02 +0200 Subject: [PATCH] Remove resource_group from secrets.yml --- pkg/commons/cluster.go | 3 +-- pkg/commons/utils.go | 12 ++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/pkg/commons/cluster.go b/pkg/commons/cluster.go index 957c12946c..9c228bbf85 100644 --- a/pkg/commons/cluster.go +++ b/pkg/commons/cluster.go @@ -212,8 +212,7 @@ type AWS struct { } type AZURE struct { - Credentials AzureCredentials `yaml:"credentials"` - ResourceGroup string `yaml:"resource_group"` + Credentials AzureCredentials `yaml:"credentials"` } type GCP struct { diff --git a/pkg/commons/utils.go b/pkg/commons/utils.go index e44b512094..28eaf0aeaa 100644 --- a/pkg/commons/utils.go +++ b/pkg/commons/utils.go @@ -191,11 +191,7 @@ func EnsureSecretsFile(descriptorFile DescriptorFile, vaultPassword string) erro if len(credentials) > 0 { creds := convertStringMapToInterfaceMap(credentials) creds = convertMapKeysToSnakeCase(creds) - if descriptorFile.InfraProvider == "azure" { - secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds, "resource_group": descriptorFile.ClusterID} - } else { - secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds} - } + secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds} } if len(externalRegistry) > 0 { @@ -236,11 +232,7 @@ func EnsureSecretsFile(descriptorFile DescriptorFile, vaultPassword string) erro edited = true creds := convertStringMapToInterfaceMap(credentials) creds = convertMapKeysToSnakeCase(creds) - if descriptorFile.InfraProvider == "azure" { - secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds, "resource_group": descriptorFile.ClusterID} - } else { - secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds} - } + secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds} } if secretMap["secrets"]["external_registry"] == nil && len(externalRegistry) > 0 {