Skip to content

stackit service-account list does not paginate #1580

Description

@JohannesRudolph

Description

I run some e2e tests against stackit for reusable tofu modules. We setup ephemeral service accounts in a project. Sometimes we don't clean up properly after a failed test run. It so happens I now have a project with >>100 service accounts.

Steps to reproduce

Run stackit service-account list

Actual behavior

The output returns only the first 100 service-accounts. It seems it does not page through the API response.

Expected behavior

The cli paginates through the API, eventually returning me all accounts. Alternatively, the CLI should expose pagination parameters (though I'd prefer it just paginates through).

Environment

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

Additional information

I have not fully researched the underlying API, so my hypothesis about pagination as the underlying cause may be wrong. I have observed some other weird behavior around service-accounts

in the stackit tofu provider

  • it claims one of my oldest service accounts was deleted (i still have it in my state)
  • upon recreation the API give me a 409 conflict saying the service account name already exists

in the stackit portal

  • the portal also only shows the first 100 SAs in the GUI

Maybe there is an alternative bug in the APIs implementation, not just the missing pagination from stackit-cli's (and the tofu providers) end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions