SQL Server

Overview

{
	"sql_server": {
		"name": "sql-lp-test-{env}",
		"keyvault": {
			"name": "kv-lp-test-{env}"
		},
        {
        "admin": {
			"username": "test1234",
			"password": "password1234"
		},

		"@log_analytics_workspace_name": "log-lp-test-{env}",
		"public_access": true,
		"version": "12.0",
		"firewall_rules": [
			{
				"name": "UserA House",
				"ip_address": "8.8.8.8"
			}
		],
		"vnet_config": {
			"@vnet_name": "vnet-lp-test-{env}",
			"@subnet_name": "sqlsub"
		},

		"location": "northeurope",
		"external": false,
		"resource_group_name": "my-rg-name",
    "tags": { "example": "S0" }
		}
	}
}

SQLServer Reference

KeyTypeDescription
name (required)stringThe name of the SQL Server (see how to name)
admin (required)Admin DefinitionThe admin account configuration
keyvault (required)KeyVault DefinitionThe Key Vault configuration
@log_analytics_workspace_namestringThe name of the log analytics workspace to bind to (defaults to no log integration)
public_accessboolWhether the SQL Server has pulbic access enabled or not (defaults to false)
versionstringThe SQL version to use (defaults 12.0)
firewall_rulesarray of optionalFirewall RulesThe firewall rules to be added to the SQL Server
vnet_configVnet configurationThe configuration of the virtual network (Defaults to no vnet integration)
locationstringResource Location (defaults to the resource group location)
externalboolA reference to an existing SQL Server (defaults to false)
resource_group_namestringThe name of the resource group where the resource is located, only with external resources (defaults to the resource group of the deployment)
tagsobjectAdditional tags for the resource (defaults to no additional tags)

Admin Configuration

KeyTypeDescription
username (required)stringThe Key Vault secret name that contains the desired admin username
password (required)stringThe Key Vault secret name that contains the desired admin password

Key Vault Configuration

KeyTypeDescription
name (required)stringThe name of the Key Vault to bind to

FirewallRules

KeyTypeDescription
namestringThe name of the firewall rule to be added
ip_addressstringThe IP address to be added to the rule

VnetConfig

KeyTypeDescription
@vnet_namestringThe name of the vnet to bind to
@subnet_namestringThe name of the subnet inside the vnet to use