Skip to main content

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration of not having storage auto-growth enabled in Azure, you can follow these steps:
  1. Log in to the Azure portal (https://portal.azure.com/).
  2. Navigate to the storage account that you want to remediate.
  3. Click on the “Configuration” tab in the left-hand menu.
  4. Under the “Data Protection” section, click on “Blob Service”.
  5. Scroll down to the “Auto-grow” section and toggle the switch to “Enabled”.
  6. Specify the maximum size that you want the storage account to grow to. You can either choose a fixed size or enable automatic growth by percentage.
  7. Click “Save” to apply the changes.
Once you have completed these steps, your storage account will automatically grow as needed to accommodate additional data. This will help prevent any potential data loss due to insufficient storage capacity.

To enable storage auto-growth for Azure using Azure CLI, follow the below steps:
  1. Open the Azure CLI on your local machine or on the Azure portal.
  2. Login to your Azure account using the command:
  3. Select the subscription in which you want to enable storage auto-growth using the command:
  4. Once you have selected the subscription, enable storage auto-growth for the Azure SQL Database using the command:
    In the above command, replace the <database-name> with the name of the database for which you want to enable storage auto-growth, <resource-group-name> with the name of the resource group in which the database is present. The --max-size parameter specifies the maximum size of the database and the --auto-grow parameter enables the storage auto-growth for the database.
  5. Once the command is executed successfully, you will receive a confirmation message.
    This confirms that storage auto-growth has been enabled for the Azure SQL Database.
To enable storage auto-growth in Azure using Python, you can use the Azure SDK for Python. Here are the steps to remediate this issue:
  1. Install the Azure SDK for Python:
  1. Import the necessary modules:
  1. Authenticate with Azure using Service Principal credentials:
  1. Create a StorageManagementClient object:
  1. Get the storage account that needs to be remediated:
  1. Enable storage auto-growth by updating the storage account:
This will enable storage auto-growth for the specified storage account in Azure.
Note: Enabling auto_grow_enabled = true is an in-place update and should not force replacement of the PostgreSQL server.To verify, terraform plan should show an update to azurerm_postgresql_server.POSTGRESQL_SERVER with auto_grow_enabled changing from false (or null) to true.