Skip to content

Commit

Permalink
Fixes #164. The error was hitting on aws create operation when no `aw…
Browse files Browse the repository at this point in the history
…s-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.
  • Loading branch information
adrianriobo committed Nov 21, 2023
1 parent 4d5733e commit e764bab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/cmd/create/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit e764bab

Please sign in to comment.