Closed docbyte86 closed 1 year ago
i was able to resolve the issue to sort the values for database roles in alphabetic order: default = ["createdb", "login"] maybe it would be helpful to make an enhancement in the documentation for other people. thank you guys.
Please switch from roles to role_set: https://registry.terraform.io/providers/SchwarzIT/stackit/latest/docs/resources/postgres_flex_user
part of release v1.21.1
Hello,
the initial tf apply ran fine, but the second results in the error, below:
╷ │ Error: Provider produced inconsistent result after apply │ │ When applying changes to module.db.stackit_postgres_flex_user.database, │ provider "provider[\"registry.terraform.io/schwarzit/stackit\"]" produced │ an unexpected new value: .roles[0]: was cty.StringVal("login"), but now │ cty.StringVal("createdb"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
terraform { required_providers { stackit = { source = "SchwarzIT/stackit" version = "1.21.0" } } }
resource "stackit_postgres_flex_user" "database" { project_id = var.database_project_id instance_id = stackit_postgres_flex_instance.database.id username = var.database_username roles = var.database_roles }
variable "database_roles" { description = "Specifies the roles assigned to the user, valid options are: login, createdb" type = list(string) default = ["login", "createdb"] }