Skip to content

Commit 30011c1

Browse files
hcsa73Henrique Santos
andauthored
Fix order (#72)
Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
1 parent 7742787 commit 30011c1

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

docs/stackit_mongodbflex_instance_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ stackit mongodbflex instance create [flags]
3535
--ram int Amount of RAM (in GB)
3636
--storage-class string Storage class (default "premium-perf2-mongodb")
3737
--storage-size int Storage size (in GB) (default 10)
38-
--type string Instance type, one of ["Single" "Replica" "Sharded"] (default "Replica")
38+
--type string Instance type, one of ["Replica" "Sharded" "Single"] (default "Replica")
3939
--version string MongoDB version. Defaults to the latest version available
4040
```
4141

docs/stackit_mongodbflex_instance_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stackit mongodbflex instance update INSTANCE_ID [flags]
3232
--ram int Amount of RAM (in GB)
3333
--storage-class string Storage class
3434
--storage-size int Storage size (in GB)
35-
--type string Instance type, one of ["Single" "Replica" "Sharded"]
35+
--type string Instance type, one of ["Replica" "Sharded" "Single"]
3636
--version string Version
3737
```
3838

docs/stackit_postgresflex_instance_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ stackit postgresflex instance create [flags]
3535
--ram int Amount of RAM (in GB)
3636
--storage-class string Storage class (default "premium-perf2-stackit")
3737
--storage-size int Storage size (in GB) (default 10)
38-
--type string Instance type, one of ["Single" "Replica"] (default "Replica")
38+
--type string Instance type, one of ["Replica" "Single"] (default "Replica")
3939
--version string PostgreSQL version. Defaults to the latest version available
4040
```
4141

docs/stackit_postgresflex_instance_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stackit postgresflex instance update INSTANCE_ID [flags]
3232
--ram int Amount of RAM (in GB)
3333
--storage-class string Storage class
3434
--storage-size int Storage size (in GB)
35-
--type string Instance type, one of ["Single" "Replica"]
35+
--type string Instance type, one of ["Replica" "Single"]
3636
--version string Version
3737
```
3838

internal/pkg/services/mongodbflex/utils/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package utils
33
import (
44
"context"
55
"fmt"
6+
"slices"
67
"strings"
78

89
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -25,6 +26,9 @@ func AvailableInstanceTypes() []string {
2526
instanceTypes[i] = k
2627
i++
2728
}
29+
// Dict keys aren't iterated in a consistent order
30+
// So we sort the array to make the output consistent
31+
slices.Sort(instanceTypes)
2832
return instanceTypes
2933
}
3034

internal/pkg/services/postgresflex/utils/utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package utils
33
import (
44
"context"
55
"fmt"
6+
"slices"
67
"strings"
78

89
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -24,6 +25,9 @@ func AvailableInstanceTypes() []string {
2425
instanceTypes[i] = k
2526
i++
2627
}
28+
// Dict keys aren't iterated in a consistent order
29+
// So we sort the array to make the output consistent
30+
slices.Sort(instanceTypes)
2731
return instanceTypes
2832
}
2933

0 commit comments

Comments
 (0)