Skip to content

Commit 06662b6

Browse files
authored
fix: fix keypair handling in e2e scrip (#199)
1 parent 5be7853 commit 06662b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/e2e/e2e.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ log_success() {
5353
}
5454

5555
log_warn() {
56-
printf "[$(date +'%T')] ⚠️ %s\n" "$*" >&2
56+
printf "[$(date +'%T')] ⚠️ %s\n" "$*" >&2
5757
}
5858

5959
log_error() {
@@ -191,10 +191,10 @@ update_inventory() {
191191
setup_ssh_key() {
192192
log "Checking for SSH key '$SSH_KEY_NAME'..."
193193

194-
if ! stackit key-pair describe "$SSH_KEY_NAME" --project-id "$PROJECT_ID" &>/dev/null; then
194+
if ! stackit key-pair describe --public-key "$SSH_KEY_NAME" --project-id "$PROJECT_ID" &>/dev/null; then
195195
log "No existing key found. Creating..."
196196
# The '@' prefix tells the CLI to read the content from the file
197-
if ! stackit key-pair create --public-key "$SSH_KEY_NAME" -y \
197+
if ! stackit key-pair create --name "$SSH_KEY_NAME" -y \
198198
--project-id "$PROJECT_ID" \
199199
--public-key "@$HOME/.ssh/$SSH_KEY_NAME.pub"; then
200200
log_error "Failed to create SSH key '$SSH_KEY_NAME' in STACKIT."

0 commit comments

Comments
 (0)