TEST_STAND/PG: clean structure with README, variables.tf, .gitignore, terraform.tfvars.example
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
resource "nubes_postgres" "npg" {
|
||||
resource_name = "pg4tf033777"
|
||||
|
||||
startup_configuration = jsonencode({
|
||||
resourceRealm = var.realm
|
||||
})
|
||||
|
||||
cluster_configuration = jsonencode({
|
||||
cpu = "500"
|
||||
memory = "512"
|
||||
replicas = "1"
|
||||
disk = "10"
|
||||
})
|
||||
|
||||
access_configuration = jsonencode({
|
||||
masterIpSpace = "no-needed"
|
||||
masterAccessList = []
|
||||
slaveIpSpace = "no-needed"
|
||||
slaveAccessList = []
|
||||
})
|
||||
|
||||
postgres_configuration = jsonencode({
|
||||
version = "17"
|
||||
sslRequired = true
|
||||
poolerMaster = false
|
||||
poolerSlave = false
|
||||
})
|
||||
|
||||
postgres_conf = jsonencode([
|
||||
{
|
||||
paramName = "log_connections"
|
||||
paramValue = "''"
|
||||
}
|
||||
])
|
||||
|
||||
backup_configuration = jsonencode({
|
||||
s3Uid = var.s3_uid
|
||||
retain = "7"
|
||||
schedule = "0 0 * * *"
|
||||
})
|
||||
|
||||
autoscale_configuration = jsonencode({
|
||||
enabled = false
|
||||
schedule = "0"
|
||||
percent = "10"
|
||||
quota = "100"
|
||||
})
|
||||
|
||||
operation_timeout = "11m"
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
resource "nubes_postgres_user" "pg_user" {
|
||||
postgres_id = nubes_postgres.npg.id
|
||||
username = "user0"
|
||||
role = "ddl_user"
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
resource "nubes_postgres_database" "db2_app" {
|
||||
postgres_id = nubes_postgres.npg.id
|
||||
db_name = "dbterra"
|
||||
db_owner = nubes_postgres_user.pg_user.username
|
||||
adopt_existing_on_create = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user