Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Invalid reordering when using capitalized role names on User and Service Account resources #206

Open
briankassouf opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@briankassouf
Copy link
Contributor

Describe the bug

When using capitalized role names (e.g. Admin) in the namespace access set the plan can sometimes result in an unnecessary, invalid planed change. This affects both the User and Service Account resources.

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following
symbols:
  ~ update in-place

Terraform will perform the following actions:

  # temporalcloud_service_account.namespace_admin will be updated in-place
  ~ resource "temporalcloud_service_account" "namespace_admin" {
        id                 = "..."
        name               = "sa-name"
      ~ namespace_accesses = [
          - {
              - namespace_id = "terraform" -> null
              - permission   = "read" -> null
            },
          - {
              - namespace_id = "terraform2" -> null
              - permission   = "write" -> null
            },
          + {
              + namespace_id = "terraform"
              + permission   = "Read"
            },
          + {
              + namespace_id = "terraform2"
              + permission   = "Write"
            },
        ]
        # (2 unchanged attributes hidden)
    }

I believe this is due to an issue upstream hashicorp/terraform-plugin-framework#1061.

Additional context

Current work around is to use lower cased role names when configuring the User and Service Account resource. For example, prefer admin over Admin.

@briankassouf briankassouf added the bug Something isn't working label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant