Skip to content

Inconsistent behavior when provisioning user roles through terraform #1244

@Koradhil

Description

@Koradhil

Description

When creating a user role assignment (the behavior is the same on organization, folder or project level, when user names include capital letters, this results in an overall inconsistent state. While the roles do get provisioned, they show up without upper case letters in the "Access" section of the portal, but the next time Terraform run, it will not recognize the existing roles due to not exactly matching the capitalization.

Steps to reproduce

  1. provision a role assignment using a subject including upper case characters
  2. run terraform, check that the role assignment has been created in the portal (with the subject completely lower case)
  3. run terraform again, and the tf plan stage will show that the previously created roles are not found, and will be created again
  4. the following tf apply will then create the roles again, which somehow still succeeds, even if the roles already exist
  5. Remove the role assignment from the template, run terraform, and the plan will contain no changes, leaving the created role assignments orphaned

Actual behavior

See above

Expected behavior

The expected behavior would be that capitalization of the subject should not have an impact on the functionality. If capital letters are allowed, then this should not result in assignments being created over and over, and eventually orphaned when removing it again in the template.

Environment

  • OS:
  • Terraform version (see terraform --version): v1.12.0
  • Version of the STACKIT Terraform provider: v0.82.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions