Skip to content

feat: add create subaccount command#716

Merged
paketeserrano merged 5 commits intomainfrom
feat/create-subaccount-cmd
Mar 16, 2026
Merged

feat: add create subaccount command#716
paketeserrano merged 5 commits intomainfrom
feat/create-subaccount-cmd

Conversation

@paketeserrano
Copy link
Contributor

Add 'account create' command for sub-account creation

Introduces 'upctl account create' to create UpCloud sub-accounts from the CLI.

What's new:

  • Required flags: --username, --password
  • Optional flags: --first-name, --last-name, --phone, --email, --timezone, --currency (defaults inherited from parent account), --allow-api (default: true), --allow-gui (default: false), --ip-filter (repeatable), --permission (repeatable, format target_type:target_identifier)
  • Language is fixed to 'en' as no other values are accepted by the API
  • Currency is validated client-side against EUR, GBP, USD, SGD
  • Permission flags are validated client-side before any API call is made
  • All access control arrays (roles, network_access, server_access, storage_access, tag_access) are sent as empty slices as required by the API
  • Unit tests covering all flags, default inheritance, validation failures, and permission granting

@paketeserrano paketeserrano requested a review from a team as a code owner March 12, 2026 15:08
@paketeserrano paketeserrano merged commit 9b02909 into main Mar 16, 2026
12 checks passed
@paketeserrano paketeserrano deleted the feat/create-subaccount-cmd branch March 16, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants