Skip to content

Commit

Permalink
Rename Vulnerability Scanner MSSQL database from prod to platform (#1208
Browse files Browse the repository at this point in the history
)

* initial commit

* delete old resources

* cleanup comments

* add output
  • Loading branch information
Richard87 authored Feb 21, 2024
1 parent 7f78e4f commit ae21cec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/radix-zone/radix_zone_prod.env
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ AZ_RESOURCE_GROUP_VULNERABILITY_SCAN_SQL="vulnerability-scan-platform"
KV_SECRET_VULNERABILITY_SCAN_SQL_ADMIN="radix-vulnerability-scan-db-admin"
KV_SECRET_VULNERABILITY_SCAN_DB_WRITER="radix-vulnerability-scan-db-writer"
KV_SECRET_VULNERABILITY_SCAN_DB_API="radix-vulnerability-scan-db-api"
VULNERABILITY_SCAN_SQL_SERVER_NAME="sql-radix-vulnerability-scan-$RADIX_ZONE"
VULNERABILITY_SCAN_SQL_SERVER_NAME="sql-radix-vulnerability-scan-platform"
VULNERABILITY_SCAN_SQL_SERVER_FQDN="$VULNERABILITY_SCAN_SQL_SERVER_NAME.database.windows.net"
VULNERABILITY_SCAN_SQL_DATABASE_NAME=radix-vulnerability-scan
VULNERABILITY_SCAN_SQL_ADMIN_LOGIN=radix
Expand Down
12 changes: 8 additions & 4 deletions terraform/subscriptions/s940/prod/vulnerability-scanner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ data "azurerm_key_vault" "keyvault" {
}
data "azurerm_key_vault_secret" "keyvault_secrets" {
name = var.keyvault_dbadmin_secret_name
key_vault_id = data.azurerm_key_vault.keyvault.id # local.external_outputs.keyvault.vault_id
key_vault_id = data.azurerm_key_vault.keyvault.id
}

# MS SQL Server
module "mssql-database" {
output "mi-client-id" {
value = module.mssql-database-platform.mi-admin
}

## MS SQL Server
module "mssql-database-platform" {
source = "../../../modules/mssqldatabase"
env = module.config.environment
database_name = "radix-vulnerability-scan"
server_name = "sql-radix-vulnerability-scan-prod" # ${module.config.environment} # Se https://github.com/equinor/radix-platform/issues/1187
server_name = "sql-radix-vulnerability-scan-${module.config.environment}"
managed_identity_admin_name = "radix-id-vulnerability-scan-admin-${module.config.environment}"
admin_adgroup = var.admin-adgroup
administrator_login = "radix"
Expand Down

0 comments on commit ae21cec

Please sign in to comment.