Skip to content

Latest commit

 

History

History
106 lines (87 loc) · 6.65 KB

README.md

File metadata and controls

106 lines (87 loc) · 6.65 KB

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     = "ad_userexample@example.com"
  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 >= 4.0.1

Providers

Name Version
azurerm >= 4.0.1

Modules

No modules.

Resources

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

Inputs

Name Description Type Default Required
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
auto_rotation_enabled Server will continuously check the key vault for any new versions of the key bool true no
azure_ad_admin_login The login username of the Azure AD Administrator of this SQL Server. string n/a yes
azure_ad_object_id The object id of the Azure AD Administrator of this SQL Server string n/a yes
connection_policy The connection policy the server will use: [Default|Proxy|Redirect] string "Default" no
custom_mssql_server_name The name of the Microsoft SQL Server string null no
env Environment name string n/a yes
ip_rules Map of IP addresses permitted for access to DB map(string) {} 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
location Specifies the supported Azure location where the resource exists string n/a yes
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
mssql_defender_state Manages Microsoft Defender state on the mssql server string null no
project Project name string n/a yes
public_network_access_enabled Whether public network access is allowed for this server bool true no
resource_group The name of the resource group in which to create the Microsoft SQL Server string n/a yes
server_version Server version string "12.0" no
tags A mapping of tags to assign to the resource map(any) {} no
tde_encryption_enabled Boolean flag that enabled Transparent Data Encryption of Server bool false no
tde_key_permissions List of tde key permissions list(string)
[
"Get",
"WrapKey",
"UnwrapKey",
"GetRotationPolicy",
"SetRotationPolicy"
]
no

Outputs

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

License

Apache 2 Licensed. For more information please see LICENSE