metalcloud-cli infrastructure add-user

Add a user to an infrastructure with access permissions

Synopsis

Grant a user access to a specific infrastructure by their email address.

This command adds the specified user to the infrastructure’s access control list, allowing them to view and potentially modify the infrastructure based on their permissions level.

Arguments: infrastructure_id_or_label The ID (numeric) or label (string) of the infrastructure user_email Email address of the user to add create_if_not_exists Optional: “true” to create user if they don’t exist (default: “false”)

Examples:

Add existing user to infrastructure

metalcloud-cli infrastructure add-user 123 “user@example.com”

Add user by infrastructure label

metalcloud-cli infrastructure add-user “web-cluster” “admin@company.com”

Add user and create if they don’t exist

metalcloud-cli infrastructure add-user my-infra “newuser@company.com” true

metalcloud-cli infrastructure add-user infrastructure_id_or_label user_email [create_if_not_exists] [flags]

Options

  -h, --help   help for add-user

Options inherited from parent commands

  -k, --api_key string         MetalCloud API key
  -c, --config string          Config file path
  -d, --debug                  Set to enable debug logging
  -e, --endpoint string        MetalCloud API endpoint
  -f, --format string          Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
  -i, --insecure_skip_verify   Set to allow insecure transport
  -l, --log_file string        Log file path
  -v, --verbosity string       Log level verbosity (default "INFO")

SEE ALSO

Auto generated by spf13/cobra on 11-Aug-2025