Files
tf_provider/TEST_STAND/LUCEE/lucee.tf
T

60 lines
1.5 KiB
Terraform

locals {
pg_host = nubes_postgres.npg_lucee.state_out_flat["internalMaster"]
pg_user = nubes_postgres_user.crud_user_0.username
pg_pass = jsondecode(nubes_postgres.npg_lucee.vault_secrets["users"]).user4crudpg.password
pg_db = nubes_postgres_database.pg_db.db_name
}
resource "nubes_lucee" "applucee" {
resource_name = "luceeresource"
startup_configuration = {
resource_realm = var.realm
}
cluster_configuration = {
cpu = 300
memory = 512
replicas = 1
}
access_configuration = {
domain = "tflucee"
}
app_configuration = {
version = "5.4"
git_path = "https://gitea.services.ngcloud.ru/Nail/tfluceecrud.git"
}
git_revision = "94ebf06"
json_env = jsonencode({
TABLE_NAME = "check_point"
testds_class = "org.postgresql.Driver"
testds_bundleName = "org.postgresql.jdbc"
testds_bundleVersion = "42.6.0"
testds_connectionString = "jdbc:postgresql://${local.pg_host}:5432/${local.pg_db}"
testds_username = local.pg_user
testds_password = local.pg_pass
testds_connectionLimit = "5"
testds_liveTimeout = "15"
testds_validate = "false"
PGHOST = local.pg_host
PGPORT = "5432"
PGUSER = local.pg_user
PGPASSWORD = local.pg_pass
PGSSLMODE = "require"
DATABASE_URL = format(
"postgresql://%s:%s@%s:5432/%s",
local.pg_user,
local.pg_pass,
local.pg_host,
local.pg_db
)
})
depends_on = [nubes_postgres.npg_lucee]
}