© Copyright 2024, Intel Corporation
This module can be used to deploy an Intel optimized Azure SQL Server instance. Instance selection is included by default in the code.
Additional MSSQL Optimizations can based off Intel Xeon Tuning Guide. Scroll down to 'Tuning SQL Server for OLTP Workload' section.
Process up to 1.37x more transactions with Azure SQL Server on 3rd Generation Intel® Xeon® Scalable Processor (Ice Lake) vs. older instances
Get up to 1.39x more Azure SQL Server performance on 3rd Generation Intel® Xeon® Scalable Processor (Ice Lake) vs. competition
Handle up to 1.48x higher Azure SQL Server online transactions on 3rd Generation Intel® Xeon® Scalable Processor (Ice Lake) vs. older instances
See examples folder for complete examples.
By default, you will only have to pass four variables
resource_group_name
mssql_server_name
mssql_db_name
mssql_administrator_login_password
variables.tf
variable "db_password" {
description = "Password for the master database user."
type = string
sensitive = true
}
main.tf
module "optimized-mssql-server" {
source = "intel/azure-mssql/intel"
resource_group_name = "ENTER_RG_NAME_HERE"
mssql_server_name = "ENTER_MSSQL_SERVER_NAME_HERE"
mssql_db_name = "ENTER_MSSQL_DB_NAME_HERE"
mssql_administrator_login_password = var.db_password
}
Run Terraform
export TF_VAR_db_password ='<USE_A_STRONG_PASSWORD>'
terraform init
terraform plan
terraform apply
This module further provides the ability to add firewall_ip_range, virtual network rule and azuread_administration resource block (Usage Example provided above). For information : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_server
Name | Version |
---|---|
azurerm | ~>3.86 |
Name | Version |
---|---|
azurerm | ~>3.86 |
No modules.
Name | Type |
---|---|
azurerm_mssql_database.mssql_db | resource |
azurerm_mssql_firewall_rule.mssql_firewall_rule | resource |
azurerm_mssql_server.mssql_server | resource |
azurerm_mssql_virtual_network_rule.mssql_vnet_rule | resource |
azurerm_resource_group.rg | data source |
azurerm_subnet.subnet | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
azuread_input_variables | The values for azuread_administrator block | list(object({ |
[] |
no |
db_backup_retention_period | The days to retain backups for. Point In Time Restore configuration. Must be between 7 and 35. | number |
7 |
no |
db_collation | Specifies the Collation for the MySQL Database. | string |
"SQL_Latin1_General_CP1_CI_AS" |
no |
db_connection_policy | The connection policy the server will use. Possible values are Default, Proxy, and Redirect. | string |
"Default" |
no |
db_create_mode | The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. | string |
"Default" |
no |
db_create_source_id | The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. For creation modes other than Default, the source server ID to use. | string |
null |
no |
db_geo_backup_enabled | A boolean that specifies if the Geo Backup Policy is enabled. Only applicable for DataWarehouse SKUs (DW*). This setting is ignored for all other SKUs. | bool |
false |
no |
db_license_type | Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. | string |
"LicenseIncluded" |
no |
db_max_size_gb | The max size of the database in gigabytes. This value should not be configured when the create_mode is Secondary or OnlineSecondary, as the sizing of the primary is then used as per Azure documentation. | number |
20 |
no |
db_min_tls_version | The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server | string |
"1.2" |
no |
db_name | MSSQL database name | string |
n/a | yes |
db_password | Password for the master database user. | string |
n/a | yes |
db_public_network_access_enabled | Public network access. Server is still by identity/authentication with public access enabled | bool |
false |
no |
db_restore_time | Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. | string |
null |
no |
db_server_name | MSSQL server name | string |
n/a | yes |
db_server_sku | Instance SKU, see comments above for guidance | string |
"GP_Fsv2_8" |
no |
db_server_version | Database server engine version for the Azure database instance. | string |
"12.0" |
no |
db_storage_account_type | Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo | string |
"Geo" |
no |
db_timeouts | Map of timeouts that can be adjusted when executing the module. This allows you to customize how long certain operations are allowed to take before being considered to have failed. | object({ |
{ |
no |
db_transparent_data_encryption_enabled | If set to true, Transparent Data Encryption will be enabled on the database. | bool |
true |
no |
db_username | Username for the master database user. | string |
"mssqladmin" |
no |
firewall_ip_range | User will provide range of IP adrress in form of List of (objects) | list(object({ |
[] |
no |
resource_group_name | Resource Group where resource will be created. It should already exist | string |
n/a | yes |
subnet_name | Specifies the name of the Subnet. | string |
null |
no |
subnet_resource_group_name | Specifies the name of the resource group the Virtual Network is located in. | string |
null |
no |
subnet_virtual_network_name | Specifies the name of the Virtual Network this Subnet is located within. | string |
null |
no |
tags | Tags | map(string) |
{} |
no |
Name | Description |
---|---|
db_backup_retention_period | Number of Days configured to retain backups for the database instance. |
db_capacity | Capacity of the Database |
db_collation | The Collation configured on the database. |
db_connection_policy | The connection policy the server uses |
db_create_mode | The creation mode that was configured on the instance. |
db_create_source_id | For creation modes other than Default, the source server ID to use. |
db_engine_version_actual | Running engine version of the database (full version number). |
db_firewall_rules | Database Firewall Rules. |
db_geo_backup_enabled | The Geo Backup Policy configured on the database |
db_hostname | Database instance fully qualified domain name. |
db_id | Database instance ID. |
db_license_type | The LicenseType configured on the database. |
db_location | Database instance location. |
db_min_tls_version | The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server |
db_name | Name of the database that has been provisioned on the database instance. |
db_password | Database instance master password. |
db_public_network_access_enabled | Public network access configured |
db_resource_group_name | Resource Group where the database instance resides. |
db_restore_time | Specifies the point in time to restore from creation_source_server_id. |
db_server_name | Database instance hostname. |
db_server_sku | Instance SKU in use for the database instance that was created. |
db_storage_account_type | Storage account type used to store backups |
db_subnet_id | The ID of the virtual network subnet to create the virtual network rule. |
db_username | Database instance master username. |