-`make-tds` will create as many new Shared Drives/Team Drives as you like
- It uses Mawaya's fclone which you can install with `install_fclone`
- If you specify one existing Shared Drive on the same account then all new Shared Drives/TDs will be created with the same Members and permissions as the existing Shared Drive
- Google accounts generally allow 12, 25 or 50 projects depending on the type of account
- You may request additional projects. But Google has been a little more selective about granting additional projects recently
- Each project may have up to 100 service accounts. If you try to create more than 100 you will see an error
- For each service account you can create and download up to 10 keys. If you try to create more than 10 keys then you will see an error
- Projects can be deleted. But they stay in a kind of deleted-project-bin for ~30 days. After the 30 day period your unused project quota will increase again
- Generally, project names are irrelevant. They can be used by most applications/ecosystems regardless of name
- Service accounts and/or their keys can be deleted. Unlike with projects, deleted service accounts and/or keys can be recreated immediately
- The naming of service accounts and their respective email addresses are, as with projects, generally irrelevant. As long as they are added to a Google Group then you can use them with Shared Drives/Team Drives.
=======================
The documentation below is mostly unchanged, but there may be small differences from the prior version (e.g. slight variable names changes). When I have spare time I will update the docs. If anything glaring, please ping me.
NOTE: `sagen` has a sister application called [safire]( https://github.com/88lex/safire ), a python app with a number of additional features and better speed. `safire` can be installed via git clone, pip install safire or from Colab. [[ It has been a while since `safire` was updated, whereas sa-gen still works nicely, but more slowly. ]]
CHANGELOG: The updated sagen does exactly what the old version did, except
- Google's back end sometimes lags for a few seconds between creating projects or service accounts and giving the sdk access to see them.
- As a result, sagen now has variable delays for each cycle of creating service accounts and between each 'function'. The functions are:
- Creating a project. If a project exists an ERROR message will tell you. It is non-fatal, ignore it.
- Enabling apis that give the SAs permission to access Google Drive and gsheets. Others can be added manually if you like.
- Creating service accounts (SAs) in each project that has been created.
- Downloading json keys that include a token that allows you to access and act upon Drive and gsheet resources. Guard the keys with your life.
- Creating a members.csv (current) and allmembers.csv (cumulative) list of all SA emails, which can be added to My Drive, a Shared Drive (Team Drive) and/or a gsheet. These emails can be added individualy or in bulk (see Bulk Add to Group).
However if you want to be certain then you can manually replace it with your own ORGANIZATION_ID. It is a numeric ID, rather than your account/domain name.
The easiest way find your own ORGANIZATION ID is to use the console where you have installed `gcloud sdk` and type the command `gcloud organizations list`.
This will show you your DISPLAY_NAME, ID, and DIRECTORY_CUSTOMER_ID. The 12 digit number in the middle is your ORGANIZATION_ID. Insert that
NOTE: DO NOT USE UPPER CASE, spaces or non-alphanumeric symbols. The GROUP_NAME and PROJECT_BASE_NAME that you use below MUST be lower-case alphanumeric characters (a-z, 0-9, - or _ are okay).
NOTE: If using a domain that you share with others, then use a name other than `sasync` as sa-gen will fail if that project name has already been used.
These are the starting and ending numbers that are appended to the project name. As noted above, a base name of `sasync` and first number of `1` will create projects `sasync1`, `sasync2` until the LAST_PROJECT_NUM .
**Please see https://github.com/88lex/sa-guide for further information. Note that sa-guide may not be completely updated, but should provide some help.**