Daily snapshot: 2025-11-10

This commit is contained in:
2025-11-10 06:48:33 +00:00
parent fabb609840
commit b533e11611
9 changed files with 173 additions and 3 deletions
+54
View File
@@ -0,0 +1,54 @@
resource "azurerm_mssql_server" "sql_server" {
name = var.sql_server_name
resource_group_name = var.resource_group_name
location = var.location
version = "12.0"
administrator_login = "4dm1n157r470r" # terraform docs
administrator_login_password = var.sql_admin_password
}
resource "azurerm_mssql_database" "oltp_database" {
name = var.oltp_database_name
server_id = azurerm_mssql_server.sql_server.id
collation = "SQL_Latin1_General_CP1_CI_AS"
license_type = "LicenseIncluded" # tbc, developer?
sku_name = "S0" # az sql db list-editions -l uksouth -o table
storage_account_type = "Local"
geo_backup_enabled = false
tags = {
volatile = true
}
lifecycle {
# prevent_destroy = true
prevent_destroy = false
# it should actually be true, so data is safe
# however our sandbox environment should be
# ripped out completely.
}
}
resource "azurerm_mssql_database" "olap_database" {
name = var.olap_database_name
server_id = azurerm_mssql_server.sql_server.id
collation = "SQL_Latin1_General_CP1_CI_AS"
license_type = "LicenseIncluded" # tbc, developer?
sku_name = "S0" # az sql db list-editions -l uksouth -o table
storage_account_type = "Local"
geo_backup_enabled = false
tags = {
volatile = true
}
lifecycle {
# prevent_destroy = true
prevent_destroy = false
# it should actually be true, so data is safe
# however our sandbox environment should be
# ripped out completely.
}
}
+3
View File
@@ -0,0 +1,3 @@
output "sql_server_id" {
value = azurerm_mssql_server.sql_server.id
}
+31
View File
@@ -0,0 +1,31 @@
variable "resource_group_name" {
description = "Resource Group to create resources in"
type = string
}
variable "location" {
description = "Azure region"
type = string
}
variable "environment" {
description = "Environment tag (dev/prod)"
type = string
}
variable "sql_admin_password" {
description = "SQL Server administrator password"
type = string
}
variable "sql_server_name" {
type = string
}
variable "oltp_database_name" {
type = string
}
variable "olap_database_name" {
type = string
}