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

ServiceAccount policy is lost when name or description changes #596

Closed
fgmpe opened this issue Nov 12, 2024 · 0 comments · Fixed by #597
Closed

ServiceAccount policy is lost when name or description changes #596

fgmpe opened this issue Nov 12, 2024 · 0 comments · Fixed by #597

Comments

@fgmpe
Copy link

fgmpe commented Nov 12, 2024

Description

When name or description is changed in existing minio_iam_service_account with custom policy, this policy resets to default policy ingerited from minio_iam_user

Steps to Reproduce

  1. use aminueza/minio 3.2.0
  2. create user and sa
     resource "minio_iam_user" "user" {
       name = "user"
     }
     resource "minio_iam_service_account" "sa" {
       target_user = minio_iam_user.user.id
       name = "name"
       policy = <<-EOT
         {
           "Version": "2012-10-17",
           "Statement": [
             {
               "Effect": "Allow",
               "Action": [ "s3:*" ],
               "Resource": [ "arn:aws:s3:::some-bucket"]
             }
           ]
         }
       EOT
     }
    
  3. update name in minio_iam_service_account, apply

Expected behavior: Go to Web UI, go to sa service account of user user and check it's policy - you should see custom policy set above.

Actual behavior: Policy of sa service account is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant