Skip to content

sushmitapandey/terraform-azurerm-mssql-server

 
 

Repository files navigation

Azure Microsoft SQL Database Server Terraform module

Terraform module for creation Azure Microsoft SQL Database Server

Usage

data "azurerm_key_vault" "example" {
  name                = "example"
  resource_group_name = "example"
}

data "azurerm_key_vault_key" "example" {
  name         = "example"
  key_vault_id = data.azurerm_key_vault.example.id
}

module "mssql_server" {
  source  = "data-platform-hq/mssql-server/azurerm"
  version = "1.2.0"

  project                  = "datahq"
  env                      = "example"
  location                 = "eastus"
  resource_group           = "example"
  admin_login              = "userexample"
  admin_password           = "passwordexample"
  azure_ad_admin_login     = "[email protected]"
  azure_ad_admin_object_id = "<uuid>"
  ip_rules = {  
    "example" = "55.55.60.0/24"
  }
  
  tde_key_permissions  = true
  key_vault_id         = data.azurerm_key_vault.example.id
  key_vault_key_id     = data.azurerm_key_vault.example.id
  
  mssql_defender_state = "Disabled"
}

Requirements

Name Version
terraform >= 1.0.0
azurerm >= 3.40.0

Providers

Name Version
azurerm 3.40.0

Modules

No modules.

Resources

Name Type
azurerm_mssql_server.this resource
azurerm_key_vault_access_policy.tde_policy resource
azurerm_mssql_server_transparent_data_encryption.this resource
azurerm_mssql_firewall_rule.this resource
azurerm_mssql_firewall_rule.azure_services resource
azurerm_azurerm_mssql_server_security_alert_policy.this resource

Inputs

Name Description Type Default Required
project Project name string n/a yes
env Environment name string n/a yes
resource_group The name of the resource group in which to create the Microsoft SQL Server string n/a yes
location Specifies the supported Azure location where the resource exists string n/a yes
admin_login The administrator login name for the server string n/a yes
admin_password The password associated with the admin_username string n/a yes
azure_ad_admin_login The login username of the Azure AD Administrator of this SQL Server string n/a yes
azure_ad_admin_object_id The object id of the Azure AD Administrator of this SQL Server string n/a yes
custom_mssql_server_name The name of the Microsoft SQL Server string null no
server_version Server version string 12.0 no
connection_policy The connection policy the server will use: [Default | Proxy | Redirect] string Default no
minimum_tls_version The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server: [1.0 | 1.1 | 1.2] string 1.2 no
public_network_access_enabled Whether public network access is allowed for this server bool true no
tags A mapping of tags to assign to the resource map(any) {} no
ip_rules Map of IP addresses permitted for access to DB string null no
tde_encryption_enabled Boolean flag that enabled Transparent Data Encryption of Server bool false no
tde_key_permissions List of tde (mssql) key permissions list(string)
[
"Get",
"WrapKey",
"UnwrapKey",
"GetRotationPolicy",
"SetRotationPolicy"
]
no
key_vault_id Key Vault ID string null no
key_vault_key_id Key Vault Key id for transparent data encryption of server string null no
auto_rotation_enabled Server will continuously check the key vault for any new versions of the key bool true no
mssql_defender_state Manages Microsoft Defender state on the mssql server: [Disabled|Enabled] string Disabled no

Outputs

Name Description
id Id of Azure SQL Server
name Azure SQL Server Name
fqdn Fully Qualified Domain Name of Azure SQL Server
identity Identity properties assigned to Azure SQL Server

License

Apache 2 Licensed. For more information please see LICENSE

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%