Skip to content

createrole role assignment for Postgres #1105

@Agraphie

Description

@Agraphie

Problem description

We need to add the createrole role to our Postgres user which is currently not possible via terraform.
Currently, we are doing this with a custom script and call to the api (https://postgres-flex-service.api.stackit.cloud/v3alpha1) and it works.

Proposed solution

It would be great to be able to add this via terraform.
Would it be possible to remove the restrictions from which roles are allwed and let the API do the validation? Similarly to this PR:

resource "stackit_postgresflex_user" "master" {
  project_id  = var.project_id
  instance_id = stackit_postgresflex_instance.db.instance_id
  username    = "master"
  roles       = ["login", "createdb", "createrole"]
  region      = "eu01"
}

Additional information

If it's fine to remove the restrictions from the provider and leave the validation up to the API I'm happy to supply a PR. Just let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions