# CREATE WORKSPACE GROUP

Creates a new workspace group.

## Syntax

```
CREATE WORKSPACE GROUP [ IF NOT EXISTS ] '<group_name>' 
    IN REGION { ID '<region_ID>' | '<region_name>' }
    [ WITH PASSWORD '<password>' ]
    [ EXPIRES AT '<expiry_time>' ]
    [ WITH FIREWALL RANGES '<ip_range>',... ]
    [ WITH BACKUP BUCKET KMS KEY ID '<backup_key_ID>' ]
    [ WITH DATA BUCKET KMS KEY ID '<data_key_ID>' ]
    [ WITH SMART DR ]
    [ ALLOW ALL TRAFFIC ]
    [ WITH UPDATE WINDOW '<day>:<hour>' ]
```

## Arguments

* `group_name`: Name of the workspace group.
* `region_ID`, `region_name`: The ID or name of the region in which the workspace group is created.
* `password`: The admin password for the workspace group. The password must contain the following:

  * At least 8 characters
  * At least one uppercase character
  * At least one lowercase character
  * At least one number or special character
* `expiry_time`: The timestamp or the time interval at which the workspace group automatically expires (terminates).
* `ip_range`: A list of allowed IP addresses or CIDR block.
* `backup_key_ID`: The KMS key ID associated with the backup bucket.
* `data_key_ID`: The KMS key ID associated with the data bucket.
* `day:hour`: The day of the week (0-6 starting on a Sunday) and the hours of the day (0-23 UTC) when the updates are applied to the workspace group.

## Remarks

* Specify the `IF NOT EXISTS` clause to create a new workspace group only when a workspace group with the specified name does not exist already. If a workspace group with the specified name already exists and the `IF NOT EXISTS` clause is not specified, the `CREATE WORKSPACE GROUP` command returns an error.
* If the `WITH BACKUP BUCKET KMS KEY ID` clause is specified, it enables Customer-Managed Encryption Keys (CMEK) encryption for the backup bucket of the workspace group. This feature is only supported in workspace groups deployed in AWS.
* If the `WITH DATA BUCKET KMS KEY ID` clause is specified, it enables Customer-Managed Encryption Keys (CMEK) encryption for the data bucket and Amazon Elastic Block Store (EBS) volumes of the workspace group. This feature is only supported in workspace groups deployed in AWS.
* Specify the `WITH SMART DR` clause to enable [Smart Disaster Recovery (DR): SmartDR](https://docs.singlestore.com/cloud/manage-data/smart-disaster-recovery-dr-smartdr.md) for the workspace group.
* Specify the `ALLOW ALL TRAFFIC` clause to allow access to the workspace group from any IP address.

## Examples

* The following command creates a workspace group in the specified region:
  ```sql
  CREATE WORKSPACE GROUP 's2wsg' IN REGION 'US East 2 (Ohio)';
  ```
* The following command creates a workspace group with additional configurations:
  ```sql
  CREATE WORKSPACE GROUP IF NOT EXISTS 's2wsg'
     IN REGION ID '93b61160-0000-1000-9000-977b8e2e3ee5'
     WITH FIREWALL RANGES '0.0.0.0/0'
     WITH SMART DR;
  ```

***

Modified at: February 13, 2025

Source: [/cloud/reference/fusion-sql/create-workspace-group/](https://docs.singlestore.com/cloud/reference/fusion-sql/create-workspace-group/)

(An index of the documentation is available at /llms.txt)
