terraform-provider-truenas icon indicating copy to clipboard operation
terraform-provider-truenas copied to clipboard

Add Group and User resources

Open aarontc opened this issue 2 years ago • 4 comments

  • Update docs with tfplugindocs
  • Add Group resource
  • Add User resource
  • Implement rudimentary translation between TrueNAS Middleware Group/User IDs and system (BSD) Group/User IDs for consistent UX
  • Only commit changes to docs/examples touched by this change

(This is my first Go project PR, if it needs any changes please let me know.)

aarontc avatar Dec 22 '22 05:12 aarontc

Looks good so far, but I would like to see some tests for both, fairly straightforward, just follow existing examples, thanks!

dariusbakunas avatar Dec 22 '22 14:12 dariusbakunas

It seems you might have based parts of your implementation on mine (https://github.com/lkubb/terraform-provider-truenas/tree/users-groups), which does contain tests and thus could be a good starting point. I wanted to submit it last year after the PR for the API, but life got in the way sadly and I was not 100% satisfied the way it was.

Otherwise, we/I can also incorporate your improvements into that branch and update the tests accordingly to get this feature over the line.

lkubb avatar Apr 25 '23 18:04 lkubb

It seems you might have based parts of your implementation on mine (https://github.com/lkubb/terraform-provider-truenas/tree/users-groups), which does contain tests and thus could be a good starting point. I wanted to submit it last year after the PR for the API, but life got in the way sadly and I was not 100% satisfied the way it was.

Otherwise, we/I can also incorporate your improvements into that branch and update the tests accordingly to get this feature over the line.

I actually had no idea that someone had started working on this when I decided to add the feature. If you've got something that works, we can definitely close my PR. Real life has gotten in the way on my end as well. I did start working on tests a while back, and I found a couple of issues already, so this PR isn't mergeable as-is.

Either way, I'll get back to this eventually... I just can't commit to when that will happen. :(

aarontc avatar Apr 27 '23 16:04 aarontc

@aarontc sorry for the ping, but are there any updates on this? I'm also interested in this feature 😄

mircea-pavel-anton avatar Nov 24 '23 08:11 mircea-pavel-anton