Tenants and tenant groups can be exported as ABL code that can be used to load the tenants and tenant groups into a different database.
The following code generates code to create a tenant domains, tenant groups and partitions in a database. Note that the reference to domains will also generate code to create users of the domains:
You can generate code that also adds tenants to a tenant group as follows. In this case the code that generates the corresponding tenant should not include the tenant groups: