Skip to content

Repair Azure environments

If you have problems with your Azure environment in Sophos Cloud Optix, you can repair it.

The repair process removes and recreates the Sophos Cloud Optix resources in your Azure environment while preserving the existing Sophos Cloud Optix settings and data.

How you repair the environment depends on how you first added it.

You can follow these instructions if you have access to the Sophos Cloud Optix account.

Using Azure PowerShell

You can use Azure PowerShell commands to remove Sophos Cloud Optix resources from your Microsoft Azure environment. To do this, do as follows:

  1. Sign in to your Sophos Cloud Optix account.
  2. Click Environments.
  3. Find the Azure environment you want to remove, then click the Delete icon Delete icon..
  4. In the confirmation dialog, under Delete the environment using Azure PowerShell, copy the commands provided. You'll need them later.

    Note

    Don't confirm the deletion at this step. You're only copying the commands needed to remove resources in Azure while preserving your Sophos Cloud Optix settings and data.

  5. Click Cancel to close the dialog.

  6. Sign in to your Microsoft Azure portal.

    Note

    You must be a user with at least the Owner role in the subscription and Application Administrator rights in Microsoft Entra ID.

  7. Open Cloud Shell from the top-right corner of the Azure portal.

  8. Select the PowerShell environment.
  9. When PowerShell is ready, paste and run the first command you copied from Sophos Cloud Optix.
  10. Paste and run the second command.
  11. When you're prompted, select whether or not to turn off Network Watcher and Flow logs.
  12. Wait for the script to complete.

Using Terraform

You can use Terraform to remove Sophos Cloud Optix resources from your Microsoft Azure environment. To do this, do as follows:

  1. Sign in to your Sophos Cloud Optix account.
  2. Click Environments.
  3. Find the Azure environment you want to remove, then click the Delete icon Delete icon..
  4. In the confirmation dialog, under Delete the environment using Terraform, copy the command provided. You'll need it later.

    Note

    Don't confirm the deletion at this step. You're only copying the command needed to remove resources in Azure while preserving your Sophos Cloud Optix settings and data.

  5. Click Cancel to close the dialog.

  6. Run the terraform destroy command using the instructions you copied from Sophos Cloud Optix to remove the resources.

    Note

    You must be a user with at least the Owner role in the subscription and Application Administrator rights in Microsoft Entra ID.

  7. Wait for the script to complete.

Add the environment again

After removing the Sophos Cloud Optix resources, you can add the environment again. For instructions, see Add your Microsoft Azure environment.