> For the complete documentation index, see [llms.txt](https://docs.release.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.release.com/reference-documentation/instant-dataset-tasks/tonic-cloud-1.md).

# Tonic On-Premise

Use Instant Datasets with Tonic On-Premise

## Requirements

1. A configured Tonic On-Premise workspace.
   * [Managing a Tonic workspace](https://docs.tonic.ai/app/workspace/managing-workspaces)
2. A source database previously connected to the workspace at least once (to configure the job and for any data masking or SQL scripts).
   * [Database connectors](https://docs.tonic.ai/app/setting-up-your-database/database-connectors)
3. An API key and a workspace ID from Tonic for Release to use on your behalf.
   * [Generating an API key](https://docs.tonic.ai/app/api/tonic-api-get-token)
   * [Getting the workspace id](https://docs.tonic.ai/app/api/getting-the-workspace-id)
4. A snapshot from AWS of the source database to use in the initial set up of the Instant Dataset.
5. An AWS security group configured to allow connections from the region your instant datasets will be located.
6. An AWS subnet group that will be attached to the databases used when cleaning up your instant dataset snapshots.

{% hint style="info" %}
Since the on-premise Tonic can be running anywhere, we can't automatically create the subnet and security groups like it's done with Tonic Cloud.
{% endhint %}

## Example configuration

```yaml
type: tonic-on-premise
config:
    tonic_api_key_ref: $secrets.aws.tonic-cloud-api-key
    tonic_workspace_id: 12fdfa34-f56b-0baf-789b-de07b40564d2
    tonic_job_database_instance_class: db.t3.small
    base_url: https://my-tonic-on-premise.url/api
    cloud_region: us-east-1
    database_name: my_database
    db_security_group_id: sg-01b06dd8874386f75
    db_subnet_group_name: default-vpc-048730d0deccd5046
```

## Schema definition

### Root schema

```yaml
type:
    type: string
    required: true
    description: The database task to run (in this case 'tonic-cloud').
config:
    type: object
    required: true
    description: An object with keys that will be specific to the task type.
```

### Config object schema

```yaml
tonic_api_key_ref:
    type: string
    required: true
    description: Tonic API key or reference arn to the API key stored in AWS SSM.

tonic_workspace_id:
    type: string
    required: true
    description: The Tonic Cloud workspace to use for this dataset.

tonic_job_database_instance_class:
    type: string
    required: true
    description: The RDS instance-type for the src/dest databases used by the Tonic job.
    
base_url:
    type: string
    required: true
    description: The URL pointing to the On-Premise Tonic service.
    
cloud_region:
    type: string
    required: true
    description: The AWS region where the temporary databases for cleaning up the snapshots are created.
    
database_name:
    type: string
    required: true
    description: The name of the database that will be cleaned up by Tonic.

db_security_group_id:
    type: string
    required: true
    description: The DB security group from AWS that will be attached to the temporary databases used to cleanup the snapshots.
    
db_subnet_group_name:
    type: string
    required: true
    description: The DB subnet group name from AWS that will be attached to the temporary databases used to cleanup the snapshots.
    
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.release.com/reference-documentation/instant-dataset-tasks/tonic-cloud-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
