Skip to content

Commit

Permalink
Fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrique Santos committed Feb 8, 2024
1 parent 72272df commit 714f94a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/stackit_mongodbflex_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stackit mongodbflex instance create [flags]
--ram int Amount of RAM (in GB)
--storage-class string Storage class (default "premium-perf2-mongodb")
--storage-size int Storage size (in GB) (default 10)
--type string Instance type, one of ["Single" "Replica" "Sharded"] (default "Replica")
--type string Instance type, one of ["Replica" "Sharded" "Single"] (default "Replica")
--version string MongoDB version. Defaults to the latest version available
```

Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_mongodbflex_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stackit mongodbflex instance update INSTANCE_ID [flags]
--ram int Amount of RAM (in GB)
--storage-class string Storage class
--storage-size int Storage size (in GB)
--type string Instance type, one of ["Sharded" "Single" "Replica"]
--type string Instance type, one of ["Replica" "Sharded" "Single"]
--version string Version
```

Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_postgresflex_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stackit postgresflex instance create [flags]
--ram int Amount of RAM (in GB)
--storage-class string Storage class (default "premium-perf2-stackit")
--storage-size int Storage size (in GB) (default 10)
--type string Instance type, one of ["Single" "Replica"] (default "Replica")
--type string Instance type, one of ["Replica" "Single"] (default "Replica")
--version string PostgreSQL version. Defaults to the latest version available
```

Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_postgresflex_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stackit postgresflex instance update INSTANCE_ID [flags]
--ram int Amount of RAM (in GB)
--storage-class string Storage class
--storage-size int Storage size (in GB)
--type string Instance type, one of ["Single" "Replica"]
--type string Instance type, one of ["Replica" "Single"]
--version string Version
```

Expand Down
4 changes: 4 additions & 0 deletions internal/pkg/services/mongodbflex/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import (
"context"
"fmt"
"slices"
"strings"

"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
Expand All @@ -25,6 +26,9 @@ func AvailableInstanceTypes() []string {
instanceTypes[i] = k
i++
}
// Dict keys aren't iterated in a consistent order
// So we sort the map to make the output consistent
slices.Sort(instanceTypes)
return instanceTypes
}

Expand Down
4 changes: 4 additions & 0 deletions internal/pkg/services/postgresflex/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import (
"context"
"fmt"
"slices"
"strings"

"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
Expand All @@ -24,6 +25,9 @@ func AvailableInstanceTypes() []string {
instanceTypes[i] = k
i++
}
// Dict keys aren't iterated in a consistent order
// So we sort the map to make the output consistent
slices.Sort(instanceTypes)
return instanceTypes
}

Expand Down

0 comments on commit 714f94a

Please sign in to comment.