Skip to content

cub serviceaccount create

cub serviceaccount create

Create a service account

Synopsis

Create a ServiceAccount entity, and the user it acts as.

The caller is given Manage permission on the new service account. Without --org-role, the service account has no organization role, so it may do only what is granted to its user.

Examples:

  # Create a service account
  cub serviceaccount create deploy-bot

  # Create a service account that can view everything in the organization
  cub serviceaccount create auditor --org-role viewer

  # Create a service account from a JSON definition
  cub serviceaccount create deploy-bot --from-stdin < serviceaccount.json
cub serviceaccount create <name> [flags]

Options

      --allow-exists           Allow creation of resources that already exist
      --annotation strings     annotations in key=value format; can separate by commas and/or use multiple instances of the flag
      --delete-gate strings    delete gates in key[=true] format; can separate by commas and/or use multiple instances of the flag
      --display-name string    friendly name for the entity, which need not be unique or URL-safe; an entity without one is shown by its slug
      --dry-run                report what the command would write, and write nothing
      --filename string        Read the ConfigHub entity's fields, as YAML or JSON, from file, URL (https://), or stdin (-), as --from-stdin does; mutually exclusive with --from-stdin
      --from-stdin             Read the ConfigHub entity's fields, as YAML or JSON, from stdin; merged with command arguments on create, and merged with command arguments and existing entity on update. A field the entity does not have, or one only the server sets, is refused; cub <entity> explain lists the fields
  -h, --help                   help for create
      --hidden-reason string   hide the entity, giving the reason as a name such as Archived: lists and bulk operations leave it out unless --include-hidden names the reason (use '-' to clear, which shows the entity again)
      --label strings          labels in key=value format; can separate by commas and/or use multiple instances of the flag
      --org-role string        organization-level role for the service account (admin, manager, editor, user, viewer, creator, member, or none), no higher than your own; the default is none, which leaves it with only the permissions granted to its user
  -o, --output string          Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
      --permission strings     permission in format Action:UserIDOrUsername, Action:group:GroupSlugOrID for a group you belong to, or Action:serviceaccount:ServiceAccountSlugOrID (e.g., Manage:user@example.com, View:group:platform, View:serviceaccount:deploy-bot, can be repeated)
      --quiet                  No default output.
      --verbose                Detailed output, additive with default output

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output

SEE ALSO