169163334 - Adds more variables to postgres TF module

This commit is contained in:
Rob Gil 2019-12-15 13:19:32 -05:00
parent f104803b6d
commit b11dc849f3
2 changed files with 32 additions and 7 deletions

View File

@ -19,17 +19,17 @@ resource "azurerm_postgresql_server" "sql" {
storage_mb = var.storage_mb
backup_retention_days = var.storage_backup_retention_days
geo_redundant_backup = var.storage_geo_redundant_backup
auto_grow = var.stroage_auto_grow
auto_grow = var.storage_auto_grow
}
administrator_login = "sqladmindude"
administrator_login_password = "eI0l7yswwtuhHpwzoVjwRKdAcuGNsg"
version = "11"
ssl_enforcement = "Enabled"
administrator_login = var.administrator_login
administrator_login_password = var.administrator_login_password
version = var.postgres_version
ssl_enforcement = var.ssl_enforcement
}
resource "azurerm_postgresql_virtual_network_rule" "sql" {
name = "postgresql-vnet-rule"
name = "${var.name}-${var.environment}-rule"
resource_group_name = azurerm_resource_group.sql.name
server_name = azurerm_postgresql_server.sql.name
subnet_id = var.subnet_id

View File

@ -51,7 +51,7 @@ variable "sku_family" {
variable "storage_mb" {
type = string
description = "Size in MB of the storage used for the sql server"
default = "5000"
default = "5120"
}
@ -73,3 +73,28 @@ variable "storage_auto_grow" {
default = "Enabled"
}
variable "administrator_login" {
type = string
description = "Administrator login"
default = "sqladmindude" # FIXME - Remove with wrapper using KeyVault
}
variable "administrator_login_password" {
type = string
description = "Administrator password"
default = "eI0l7yswwtuhHpwzoVjwRKdAcuGNsg" # FIXME - Remove with wrapper using KeyVault
}
variable "postgres_version" {
type = string
description = "Postgres version to use"
default = "11"
}
variable "ssl_enforcement" {
type = string
description = "Enforce SSL (Enabled/Disable)"
default = "Enabled"
}