-
Notifications
You must be signed in to change notification settings - Fork 50
Description
According to the STACKIT MariaDB documentation it should be possible to declaratively create additional databases using the databases custom parameter.
Documentation reference:
https://docs.stackit.cloud/products/databases/mariadb/how-tos/create-and-manage-databases/
The documentation explicitly states that the parameter accepts an array of strings.
Example from the docs:
{ "max_disk_threshold": 80, "sgw_acl": "192.168.0.0/24,192.168.1.0", "databases": ["db1", "db2"] }
However, when using this parameter either through Terraform or directly in the STACKIT Portal JSON editor, the instance update fails.
Reproduction
MariaDB instance defined with Terraform:
`resource "stackit_mariadb_instance" "staffingtool" {
project_id = var.project_id
name = "${var.project_name}-${var.environment}-1"
version = var.db_version
plan_name = var.db_plan_name
parameters = {
sgw_acl = "${var.network_prefix},${var.admin_cidr}"
databases = ["customdb1"]
}
}`
Terraform apply succeeds, but the service operation fails.
The same JSON entered manually in the STACKIT Portal:
{ "max_disk_threshold": 80, "sgw_acl": "10.2.0.0/24,95.91.218.110/32", "databases": ["customdb1"] }
Results in:
Configuration parameters are missing: User parameter databases has an invalid value 'customdb1'.
Expected behavior
The MariaDB instance should create an additional database called staffingtool, as described in the documentation.
Actual behavior
The instance update fails and the database is not created.
Portal error message:
Configuration parameters are missing: User parameter databases has an invalid value 'customdb1'.
Additional observations
The CLI documentation for MariaDB instance management does not list any parameters related to database creation:
This suggests that the functionality might not yet be fully implemented or documented consistently across API / Portal / Terraform provider.
The documentation also states that the databases parameter is declarative and omitted databases will be dropped. Therefore a reliable and supported mechanism for defining databases is critical for Infrastructure as Code workflows.
Environment
STACKIT MariaDB version: 10.11
Terraform provider: stackitcloud/stackit 0.71.0