Skip to content

Commit c963011

Browse files
Merge branch 'main' into feat/support-wif-ske-exec
2 parents 971d995 + 4578838 commit c963011

24 files changed

Lines changed: 259 additions & 104 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v7.0.0
20+
uses: actions/checkout@v7.0.1
2121

2222
- name: Install go
2323
uses: actions/setup-go@v7.0.0
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
steps:
4949
- name: Checkout
50-
uses: actions/checkout@v7.0.0
50+
uses: actions/checkout@v7.0.1
5151

5252
- name: Check GoReleaser
5353
uses: goreleaser/goreleaser-action@v7.2.3

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v7.0.0
26+
uses: actions/checkout@v7.0.1
2727
with:
2828
# Allow goreleaser to access older tag information.
2929
fetch-depth: 0
@@ -106,7 +106,7 @@ jobs:
106106
AWS_SECRET_ACCESS_KEY: ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
107107
steps:
108108
- name: Checkout
109-
uses: actions/checkout@v7.0.0
109+
uses: actions/checkout@v7.0.1
110110

111111
# use the artifacts from the "goreleaser" job
112112
- name: Download artifacts from workflow
@@ -144,7 +144,7 @@ jobs:
144144
AWS_ENDPOINT_URL: https://object.storage.eu01.onstackit.cloud
145145
steps:
146146
- name: Checkout
147-
uses: actions/checkout@v7.0.0
147+
uses: actions/checkout@v7.0.1
148148

149149
- name: Download artifacts from workflow
150150
uses: actions/download-artifact@v8

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
timeout-minutes: 10
2525
steps:
2626
- name: "Mark old PRs as stale"
27-
uses: actions/stale@v10.4.0
27+
uses: actions/stale@v11.0.0
2828
with:
2929
repo-token: ${{ secrets.GITHUB_TOKEN }}
3030
stale-pr-message: "This PR was marked as stale after ${{ env.DAYS_BEFORE_PR_STALE }} days of inactivity and will be closed after another ${{ env.DAYS_BEFORE_PR_CLOSE }} days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it."

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ go.work.sum
1616
# Test coverage reports
1717
coverage.out
1818
coverage.html
19+
20+
# Shell completions
21+
completions/

.goreleaser.yaml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ version: 2
33
before:
44
hooks:
55
- go mod tidy
6+
# Shell completion files
7+
- mkdir -p ./completions
8+
- sh -c 'go run ./main.go completion zsh > ./completions/stackit.zsh'
9+
- sh -c 'go run ./main.go completion bash > ./completions/stackit.bash'
10+
- sh -c 'go run ./main.go completion fish > ./completions/stackit.fish'
611

712
builds:
813
- id: linux-builds
@@ -47,11 +52,6 @@ builds:
4752
output: true
4853
- cmd: spctl -a -t open --context context:primary-signature -v dist/{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}.dmg
4954
output: true
50-
# Completion files
51-
- cmd: mkdir -p dist/completions
52-
- cmd: sh -c 'go run main.go completion zsh > ./dist/completions/stackit.zsh'
53-
- cmd: sh -c 'go run main.go completion bash > ./dist/completions/stackit.bash'
54-
- cmd: sh -c 'go run main.go completion fish > ./dist/completions/stackit.fish'
5555

5656
- id: freebsd-builds
5757
env:
@@ -74,7 +74,7 @@ archives:
7474
- freebsd-builds
7575
formats: [ 'tar.gz' ]
7676
files:
77-
- src: ./dist/completions/*
77+
- src: ./completions/*
7878
dst: completions
7979
- LICENSE.md
8080
- README.md
@@ -108,6 +108,18 @@ nfpms:
108108
dst: /usr/share/doc/stackit/copyright
109109
file_info:
110110
mode: 0644
111+
- src: ./completions/stackit.bash
112+
dst: /usr/share/bash-completion/completions/stackit
113+
file_info:
114+
mode: 0644
115+
- src: ./completions/stackit.zsh
116+
dst: /usr/share/zsh/vendor-completions/_stackit
117+
file_info:
118+
mode: 0644
119+
- src: ./completions/stackit.fish
120+
dst: /usr/share/fish/vendor_completions.d/stackit.fish
121+
file_info:
122+
mode: 0644
111123
formats:
112124
- deb
113125
- rpm
@@ -155,25 +167,7 @@ snapcrafts:
155167
grade: stable
156168
# Whether to publish the Snap to the store
157169
publish: true
158-
159-
winget:
160-
- name: stackit
161-
publisher: stackitcloud
162-
short_description: A command-line interface to manage STACKIT resources.
163-
license: Apache-2.0
164-
publisher_support_url: "https://github.com/stackitcloud/stackit-cli/issues"
165-
package_identifier: stackitcloud.stackit
166-
homepage: "https://github.com/stackitcloud/stackit-cli"
167-
# If set to auto, the release will not be uploaded to the homebrew tap repo
168-
# if the tag has a prerelease indicator (e.g. v0.0.1-alpha1)
169-
# Temporarily not skipping prereleases to test integration with Winget
170-
# skip_upload: auto
171-
repository:
172-
owner: stackitcloud
173-
name: winget-pkgs
174-
pull_request:
175-
enabled: true
176-
base:
177-
owner: microsoft
178-
name: winget-pkgs
179-
branch: master
170+
apps:
171+
stackit:
172+
command: stackit
173+
completer: completions/stackit.bash

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![Go Report Card](https://goreportcard.com/badge/github.com/stackitcloud/stackit-cli)](https://goreportcard.com/report/github.com/stackitcloud/stackit-cli) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/stackitcloud/stackit-cli) [![GitHub License](https://img.shields.io/github/license/stackitcloud/stackit-cli)](https://www.apache.org/licenses/LICENSE-2.0)
1111

12-
Welcome to the STACKIT CLI, a command-line interface for [STACKIT - The sovereign cloud for Europe](https://www.stackit.de/en).
12+
Welcome to the STACKIT CLI, a command-line interface for [STACKIT - The sovereign cloud for Europe](https://www.stackit.com/).
1313

1414
The STACKIT CLI allows you to manage your STACKIT services and resources as well as perform operations using the command-line or in scripts or automation, such as:
1515

@@ -206,7 +206,7 @@ Apache 2.0
206206

207207
- [STACKIT Portal](https://portal.stackit.cloud/)
208208

209-
- [STACKIT](https://www.stackit.de/en/)
209+
- [STACKIT](https://www.stackit.com/)
210210

211211
- [STACKIT Docs](https://docs.stackit.cloud/)
212212

SECURITY.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ require (
2727
github.com/stackitcloud/stackit-sdk-go/services/logs v0.10.0
2828
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v1.12.0
2929
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0
30-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0
30+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0
3131
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.24.0
3232
github.com/stackitcloud/stackit-sdk-go/services/runcommand v1.8.0
3333
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.18.1
3434
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.7.0
3535
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v1.5.2
3636
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.20.0
3737
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0
38-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0
38+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0
3939
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1
4040
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
4141
github.com/zalando/go-keyring v0.2.8
42-
golang.org/x/mod v0.37.0
42+
golang.org/x/mod v0.38.0
4343
golang.org/x/oauth2 v0.36.0
4444
golang.org/x/term v0.44.0
4545
golang.org/x/text v0.40.0
@@ -265,7 +265,7 @@ require (
265265
github.com/spf13/afero v1.15.0 // indirect
266266
github.com/spf13/cast v1.10.0 // indirect
267267
github.com/stackitcloud/stackit-sdk-go/services/kms v1.11.0
268-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0
268+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.15.0
269269
github.com/stackitcloud/stackit-sdk-go/services/logme v1.0.1
270270
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.30.0
271271
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.9.0

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ github.com/stackitcloud/stackit-sdk-go/services/intake v0.7.1 h1:7ZSrwps/zI41rl+
610610
github.com/stackitcloud/stackit-sdk-go/services/intake v0.7.1/go.mod h1:ZIvwBZwEMFO+YfJLCNXqabslI0Fp9zxV7ZBwlZjk7uE=
611611
github.com/stackitcloud/stackit-sdk-go/services/kms v1.11.0 h1:OrUaDypQNr1nOXZfVQXCwUpN4YhR5y0vtvYi9/Ogoi4=
612612
github.com/stackitcloud/stackit-sdk-go/services/kms v1.11.0/go.mod h1:pVaCmb1ZHAPGVRlSlBlVOjThp9Tb2sX9+nRX0M+d1KU=
613-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0 h1:1dvL7tX91ziklayQmOupniE3jM4D5Nbtc0auNcx2p18=
614-
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0/go.mod h1:+Ld3dn648I+YKcBV3fEkYpDSr3fel421+LurJGywSBs=
613+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.15.0 h1:YWpy3VDKrTKVgvnHgbLFYRZ4qUKiNxzCejUNdWIYZ6Q=
614+
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.15.0/go.mod h1:+Ld3dn648I+YKcBV3fEkYpDSr3fel421+LurJGywSBs=
615615
github.com/stackitcloud/stackit-sdk-go/services/logme v1.0.1 h1:iteL61eMMPWT6872nF4Ko/tBU1IXemvS++XR09pj6NA=
616616
github.com/stackitcloud/stackit-sdk-go/services/logme v1.0.1/go.mod h1:JDOOYaGgcBts2x52nKPRMFgSZe7qqOFmfz1xIXCQgRY=
617617
github.com/stackitcloud/stackit-sdk-go/services/logs v0.10.0 h1:g7zpfQFFq3UhAWrMK9rPaZY6dLMAuMJf5g6+r7VRTXc=
@@ -626,8 +626,8 @@ github.com/stackitcloud/stackit-sdk-go/services/observability v0.24.0 h1:KhuWPXr
626626
github.com/stackitcloud/stackit-sdk-go/services/observability v0.24.0/go.mod h1:0fEZQHm729mBdvg4sNrAhM6KmHROHJSeS2FwCMRk46k=
627627
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0 h1:hooc/E9Qabn8xno1NUd3uJQfUbW5KoY6mgURlnd776c=
628628
github.com/stackitcloud/stackit-sdk-go/services/opensearch v1.1.0/go.mod h1:L+NlfC1hilLOqlLLukCj/UDnxlnNrc/oMikcw3Ansyw=
629-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0 h1:cuI4NhuFhaZ3tTkBpUM7nt2odKFJkyCcphT/3gGb9CE=
630-
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.11.0/go.mod h1:yzlakB+f8ur4yAHR6lyCABO+HcEtZG3G2Faj6m5/uW8=
629+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0 h1:elIyrDVSYlEtigFO82SWnpfuJZdpv0b2SwvL3M+z9dA=
630+
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v1.12.0/go.mod h1:yzlakB+f8ur4yAHR6lyCABO+HcEtZG3G2Faj6m5/uW8=
631631
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v1.1.1 h1:Vly7OKWAwfrbE31N/tUMmLkl7pKybSnek0IPh8offRk=
632632
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v1.1.1/go.mod h1:TwfVVynB/+AKbccSOLk2qZpPL1tdK43BBAiACP6EtSg=
633633
github.com/stackitcloud/stackit-sdk-go/services/redis v1.1.0 h1:ckYMRXAGE2/vaxPeNGEuun9AGcFn/8xuu0ytfsiqfWU=
@@ -648,8 +648,8 @@ github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0 h1:TNZH
648648
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.0/go.mod h1:fXq3TmVLb4JMSve989NFFViMFoYa83s7M3hJWgN6mdQ=
649649
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0 h1:JWAFnskRbNKT8x62pZcAMCC+p5hyTEkAyxqFwy39jFA=
650650
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0/go.mod h1:jMlBoXqrPNX5nXbo6oT7exalqilw1jiLPoIp4Cn0CdI=
651-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0 h1:QoKyQPe8FqDqJLNgE5uRlZ/y1c1GUxjV1DDLu5QEBD8=
652-
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0/go.mod h1:KhVYCR58wETqdI7Quwhe3OR3BhB2T/b7DzaMsfDnr8g=
651+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0 h1:eu9PhRdL2GkXpHtf4NN9YBCUYcARdvAwq+g/FW4hmi4=
652+
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.0/go.mod h1:TbqmZhLMofmfl+HhVl6oHYcI3zvXTm1vRjN3A/fOkM4=
653653
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1 h1:pjFVw2Tc0cSfAzmyZRiLknuKSADs7nPXNUyrM216CwQ=
654654
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.16.1/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
655655
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=
@@ -789,8 +789,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
789789
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
790790
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
791791
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
792-
golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ=
793-
golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
792+
golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk=
793+
golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40=
794794
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
795795
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
796796
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

internal/cmd/beta/sqlserverflex/instance/create/create.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient sqlserverfle
186186
var flavorId string
187187
var err error
188188

189-
flavors, err := apiClient.ListFlavors(ctx, model.ProjectId, model.Region).Execute()
189+
flavors, err := sqlserverflexUtils.ListAllFlavors(ctx, apiClient, model.ProjectId, model.Region)
190190
if err != nil {
191191
return req, fmt.Errorf("get SQLServer Flex flavors: %w", err)
192192
}
193193

194194
if model.FlavorId == nil {
195-
flavorId, err = sqlserverflexUtils.LoadFlavorId(*model.CPU, *model.RAM, flavors.Flavors)
195+
flavorId, err = sqlserverflexUtils.LoadFlavorId(*model.CPU, *model.RAM, flavors)
196196
if err != nil {
197197
var dsaInvalidPlanError *cliErr.DSAInvalidPlanError
198198
if !errors.As(err, &dsaInvalidPlanError) {
@@ -201,7 +201,7 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient sqlserverfle
201201
return req, err
202202
}
203203
} else {
204-
err := sqlserverflexUtils.ValidateFlavorId(*model.FlavorId, flavors.Flavors)
204+
err := sqlserverflexUtils.ValidateFlavorId(*model.FlavorId, flavors)
205205
if err != nil {
206206
return req, err
207207
}

0 commit comments

Comments
 (0)