From e764bab02b5777e27c2adc01f7585a7203a6857c Mon Sep 17 00:00:00 2001 From: Adrian Riobo Lorenzo Date: Tue, 21 Nov 2023 10:33:24 +0100 Subject: [PATCH] Fixes #164. The error was hitting on aws create operation when no `aws-disk-size` parameter was set. This behaviour was hit due to the fact that all parameters were passed to the provider, no matter if they were set or not on the cmd (with empty string as param value). This commit will check if each parameter is set on the cmd before adding it to the set of params to be passed to the aws provider. --- cmd/cmd/create/aws.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/cmd/create/aws.go b/cmd/cmd/create/aws.go index 69513703..4c36de01 100644 --- a/cmd/cmd/create/aws.go +++ b/cmd/cmd/create/aws.go @@ -27,7 +27,9 @@ func getAWSProviderCmd() *cobra.Command { // Provider dependent params providerParams := make(map[string]string) for name := range manager.CreateParams() { - providerParams[name] = viper.GetString(name) + if viper.IsSet(name) { + providerParams[name] = viper.GetString(name) + } } if err := manager.Create( viper.GetString(constants.ProjectName),