Skip to content

T-Systems-MMS/terraform-azurerm-mssql

Repository files navigation

mssql

This module manages Azure MS SQL.

<-- This file is autogenerated, please do not change. -->

Requirements

Name Version
terraform ~>1.0
azurerm ~>3.0, <4.0

Providers

Name Version
azurerm ~>3.0, <4.0

Resources

Name Type
azurerm_mssql_database.mssql_database resource
azurerm_mssql_firewall_rule.mssql_firewall_rule resource
azurerm_mssql_server.mssql_server resource
azurerm_mssql_virtual_network_rule.mssql_virtual_network_rule resource

Inputs

Name Description Type Default Required
mssql_database resource definition, default settings are defined within locals and merged with var settings any {} no
mssql_firewall_rule resource definition, default settings are defined within locals and merged with var settings any {} no
mssql_server resource definition, default settings are defined within locals and merged with var settings any {} no
mssql_virtual_network_rule resource definition, default settings are defined within locals and merged with var settings any {} no

Outputs

Name Description
mssql_database azurerm_mssql_database
mssql_server azurerm_mssql_server

Examples

module "mssql" {
  source = "registry.terraform.io/T-Systems-MMS/mssql/azurerm"
  mssql_server = {
    service-db = {
      location                     = "westeurope"
      resource_group_name          = "service-rg"
      version                      = "12.0"
      administrator_login          = "mysqlroot"
      administrator_login_password = "password"
      tags = {
        service = "service_name"
      }
    }
  }
  mssql_database = {
    service = {
      server_id                        = module.mssql.mssql_server["service-db"].id
      max_size_bytes                   = "2147483648"
      edition                          = "Standard"
      requested_service_objective_name = "S0"
      tags                             = local.tags
    }
  }
  mssql_virtual_network_rule = {
    db-subnet = {
      resource_group_name = "service-rg"
      server_name         = module.mssql.mysql_server["service-db"].name
      subnet_id           = module.network.subnet.db-subnet.id
    }
  }
  mssql_firewall_rule = {
    proxy = {
      resource_group_name = "service-rg"
      server_name         = module.mysql.mysql_server["service-db"].name
      start_ip_address    = "127.0.0.1"
      end_ip_address      = "127.0.0.2"
    }
  }
}