Skip to main content

More Info:

Ensure that Storage Auto-Growth feature is enabled for your production Azure PostgreSQL database servers. Storage auto-growth prevents your PostgreSQL servers from running out of storage and becoming read-only.

Risk Level

High

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

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.