Skip to content

Failed to print object-storage credentials while creating them #1448

Description

@tboerger

Description

Created object-storage credentials successfully, but never ptrinted them after creation.

Steps to reproduce

  1. Run stackit object-storage credentials create --credentials-group-id "${CREDENTIALS_GROUP_ID}" --assume-yes --project-id "${PROJECT_ID}"

Actual behavior

Warning: Auto-confirming prompt: "Are you sure you want to create credentials in group \"terraform\"?"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1016f7c88]

goroutine 1 [running]:
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create.outputResult.func1()
	github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create/create.go:137 +0x38
github.com/stackitcloud/stackit-cli/internal/pkg/print.(*Printer).OutputResult(0x0?, {0x0?, 0x0?}, {0x1039b9d20?, 0x36ae93a4e1c0?}, 0x0?)
	github.com/stackitcloud/stackit-cli/internal/pkg/print/print.go:309 +0x2c0
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create.outputResult(0x36ae93c85888?, {0x0?, 0x103b7c080?}, {0x36ae93c83a90?, 0x36ae93c85888?}, 0x16f1c57b3?)
	github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create/create.go:135 +0xa4
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create.NewCmd.func1(0x36ae93c26800?, {0x36ae93a0e690?, 0x4?, 0x1020f7f24?})
	github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create/create.go:82 +0x260
github.com/spf13/cobra.(*Command).execute(0x36ae93c3d508, {0x36ae93a0e640, 0x5, 0x5})
	github.com/spf13/cobra@v1.10.2/command.go:1015 +0x814
github.com/spf13/cobra.(*Command).ExecuteC(0x36ae93876c08)
	github.com/spf13/cobra@v1.10.2/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/stackitcloud/stackit-cli/internal/cmd.Execute(0x36ae93a0f310)
	github.com/stackitcloud/stackit-cli/internal/cmd/root.go:221 +0x38
main.main()
	github.com/stackitcloud/stackit-cli/main.go:34 +0x134

Expected behavior

The generated credentials are printed by the command.

Environment

  • OS: macOS
  • Version of STACKIT CLI (see stackit --version): v0.63.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions