> [!WARNING]
>
> **Preview**
>
>
> This product is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

This page explains how to set up a new experiment template for Failover
Cloud SQL.

This fault lets you failover from a primary to a replica instance of HA
Cloud SQL.

Before proceeding, you must have the following:

- Permission to view Cloud SQL instances in the project.
- Fault Injection Testing API [enabled for the project](https://docs.cloud.google.com/fault-injection-testing/access-control.md.txt#enable-apis).
- The `roles/faulttesting.operator` role.

To create a new experiment template, do the following:

1. Open the [Google Cloud console](https://console.cloud.google.com/).
2. Navigate to the Fault Injection Testing **Overview** page.
3. Select **Create experiment template** .
   - Alternatively, from the Fault Injection Testing **Overview** page, click **Experiment templates** on the left navigation bar, and click **Create
     Template**.
4. In the **Fault Type** section, select the **Failover Cloud SQL** option.
5. In the **Target** section, use the filters and select a single instance. NOTE: **For Cloud SQL, when an experiment is stopped, the database will
   continue to run in the secondary zone and it will not automatically revert
   to running in the initial primary zone**. If you want to fail back the instance, you can do so manually or by running another experiment targeting the newly failed-over instance.
6. The duration field in the **Duration** section is non-editable, and set to 3 minutes.
7. In the **Template name** section, provide a clear and descriptive name for the template. Optionally provide details in the description.
8. In the **Verify** section:
   - See a recap of the settings you selected.
   - Wait for the automated dry run to finish.
   - After the dry run is complete, the list of resources that will receive the fault injection appears. If there are errors with the targeted resources, they will also appear here.
9. **Create** the experiment template. A confirmation message indicating that the template has been created appears, and the new template shows up in the list of templates.

## What's next

[Run an experiment](https://docs.cloud.google.com/fault-injection-testing/run-experiment.md.txt) using the experiment template you
created.