Skip to content

azurerm_mssql_managed_instance - increase storage_size_in_gb maximum to 32768#31387

Merged
mbfrahry merged 2 commits intohashicorp:mainfrom
oyiz-michael:increase-sql-managed-instance-storage-limit
Jan 1, 2026
Merged

azurerm_mssql_managed_instance - increase storage_size_in_gb maximum to 32768#31387
mbfrahry merged 2 commits intohashicorp:mainfrom
oyiz-michael:increase-sql-managed-instance-storage-limit

Conversation

@oyiz-michael
Copy link
Contributor

@oyiz-michael oyiz-michael commented Dec 19, 2025

Description

Fixes #31390

When building a SQL Managed Instance with anything higher than 16384 GB of storage, you get an error:

Error: expected storage_size_in_gb to be in the range (32 - 16384), got 20480

with module.sql_managed_instance.azurerm_mssql_managed_instance.sqlmi,
on ......\Modules\sql-managed-instance\v1.0\main.tf line 8, in resource "azurerm_mssql_managed_instance" "sqlmi":
8: storage_size_in_gb = var.storage_size_in_gb

resource "azurerm_mssql_managed_instance" "sqlmi" {
name = ""
resource_group_name = ""
location = "westus"

license_type = "BasePrice"
sku_name = "GP_Gen5"
storage_size_in_gb = 20480
vcores = 32
}

│ Error: expected storage_size_in_gb to be in the range (32 - 16384), got 20480

│ with module.sql_managed_instance.azurerm_mssql_managed_instance.sqlmi,
│ on ......\Modules\sql-managed-instance\v1.0\main.tf line 8, in resource "azurerm_mssql_managed_instance" "sqlmi":
│ 8: storage_size_in_gb = var.storage_size_in_gb

Expected Behaviour:
It should scale storage to 32768

Actual Behaviour:
Error: expected storage_size_in_gb to be in the range (32 - 16384), got 20480

Steps to Reproduce:
Build a SQL managed instance with 20480 GB of storage and it will fail.

I can see in the Azure Portal GUI, the slider goes up to 32768 GB (32 TB) for General Purpose Next-gen instances.

This PR increases the maximum value for storage_size_in_gb in azurerm_mssql_managed_instance from 16,384 GB to 32,768 GB (32 TB) to align with Azure's current maximum limits.

According to Azure SQL Managed Instance resource limits, General Purpose Next-gen instances now support up to 32 TB of storage. The previous validation limit of 16,384 GB was preventing users from provisioning instances with storage requirements between 16 TB and 32 TB.

Screenshot 2025-12-19 at 01 31 29

This follows the same pattern as #17710 / #17711 from 2022, where the limit was increased from 8,192 GB to 16,384 GB.

Fixes #31390

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Copy link
Collaborator

@sreallymatt sreallymatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oyiz-michael, just one minor comment regarding the docs

@mbfrahry mbfrahry dismissed sreallymatt’s stale review January 1, 2026 00:22

Review addressed

@mbfrahry mbfrahry changed the title azurerm_mssql_managed_instance - increase storage_size_in_gb maximum … azurerm_mssql_managed_instance - increase storage_size_in_gb maximum to 32768 Jan 1, 2026
@mbfrahry mbfrahry added this to the v4.58.0 milestone Jan 1, 2026
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mbfrahry mbfrahry merged commit 6814cbd into hashicorp:main Jan 1, 2026
34 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azurerm_mssql_managed_instance - storage_size_in_gb is limited to 16384 instead of 32768

5 participants