Closed b1ackbeardast closed 2 years ago
Hi! Thank you for reporting this issue.
To make sure I can reproduce correctly, can you tell me how exactly you created your user and your subuser?
Should be fixed by https://gitlab.com/lama-corp/infra/tools/terraform-provider-rgw/-/merge_requests/7. I'll release a 0.1.1 once that gets in.
Do you mind trying with https://github.com/rissson/terraform-provider-rgw/releases/tag/0.1.1 and closing if it fixed the issue (which it should)?
To make sure I can reproduce correctly, can you tell me how exactly you created your user and your subuser?
Hey! I had a case where I needed to create a read-only s3 key pair. I created a subuser, specifying the parent of the user that I created using your provider.
# radosgw-admin subuser create --uid = test2 --subuser = bober --key-type = s3 --access = read
And on the next attempt to run terraform, the provider crashed.
Do you mind trying with https://github.com/rissson/terraform-provider-rgw/releases/tag/0.1.1 and closing if it fixed the issue (which it should)?
Okay, thanks for the fix, I'll check it today.
As an experiment, I created another
subuser for another user with different permissions.
# radosgw-admin subuser create --uid=test --subuser=bober3 --key-type=s3 --access=write
All changes were correctly pulled in the state. Your fix works, thanks!
# rgw_user.test_user has been changed
~ resource "rgw_user" "test_user" {
id = "test"
~ keys = [
{
access_key = "хххххх"
secret_key = "хххххх"
user = "test"
},
+ {
+ access_key = "хххххх"
+ secret_key = "хххххх"
+ user = "test:bober3"
},
]
~ subusers = [
+ {
+ id = "test:bober3"
+ permissions = "write"
},
]
# (12 unchanged attributes hidden)
}
It would be great if the provider supported to manage subusers and user quotas)
It would be great if the provider supported to manage subusers
Unfortunately, I use https://github.com/ceph/go-ceph/ which does not support creating subusers. Here is the associated issue: https://github.com/ceph/go-ceph/issues/521.
and user quotas
That indeed is on my roadmap, I just have to find time to write it, along with bucket quotas and the associated data sources.
Hey! I get an error:
My main.tf looks like this:
My cluster version and user information:
If I remove the subuser and run the terraform plan everything works.