Skip to content

Commit

Permalink
fix: machine types
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk committed Aug 20, 2024
1 parent b19337a commit 87054b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions create/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ func (cmd *mySQLCmd) newMySQL(namespace string) *storage.MySQL {
// ApplicationKongVars returns all variables which are used in the application
// create command
func MySQLKongVars() kong.Vars {
vmTypes := make([]string, len(infra.MachineTypes))
for i, machineType := range infra.MachineTypes {
vmTypes := make([]string, len(storage.MySQLMachineTypes))
for i, machineType := range storage.MySQLMachineTypes {
vmTypes[i] = string(machineType)
}

result := make(kong.Vars)
result["mysql_machine_types"] = strings.Join(vmTypes, ", ")
result["mysql_machine_default"] = string(infra.MachineTypes[0])
result["mysql_machine_default"] = string(storage.MySQLMachineTypeDefault)
result["mysql_location_options"] = strings.Join(storage.MySQLLocationOptions, ", ")
result["mysql_location_default"] = string(storage.MySQLLocationDefault)
result["mysql_user"] = string(storage.MySQLUser)
Expand Down
6 changes: 3 additions & 3 deletions create/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ func (cmd *postgresCmd) newPostgres(namespace string) *storage.Postgres {
// ApplicationKongVars returns all variables which are used in the application
// create command
func PostgresKongVars() kong.Vars {
vmTypes := make([]string, len(infra.MachineTypes))
for i, machineType := range infra.MachineTypes {
vmTypes := make([]string, len(storage.PostgresMachineTypes))
for i, machineType := range storage.PostgresMachineTypes {
vmTypes[i] = string(machineType)
}

result := make(kong.Vars)
result["postgres_machine_types"] = strings.Join(vmTypes, ", ")
result["postgres_machine_default"] = string(infra.MachineTypes[0])
result["postgres_machine_default"] = string(storage.PostgresMachineTypeDefault)
result["postgres_location_options"] = strings.Join(storage.PostgresLocationOptions, ", ")
result["postgres_location_default"] = string(storage.PostgresLocationDefault)
result["postgres_version_default"] = string(storage.PostgresVersionDefault)
Expand Down

0 comments on commit 87054b9

Please sign in to comment.