Open favoretti opened 6 months ago
Godsend! Yes, please!
@magne ping? I know it's holiday season, but... :) Thanks for looking!
I will have another look at this if you include acceptance tests. Also, the update and import operations should be working.
Other than that, it looks OK (haven't tested it yet). Thanks for your work.
Makes sense. I'll add tests in the next couple of days. I tested functionality itself - it works, but I got a bit lost in your test suite, need to dive in.
Thank you!
@magne Looking at your comment on update and import operations. Re: update - I don't really wanna compare the lists of permissions, and I don't see a lot of harm in dropping them and creating them again (i.e. we can opt in to skip update op altogether and just leave all fields as ForceNew
) - what's your take on this?
@favoretti, I'm not really sure. It's been some time since I did real terraform provider coding, and I don't remember how it behaved without the update. Why don't you add import and the tests, and I'll take it for a spin and see how it behaves. (Does it recreate the resource on every apply
?)
Without update it just assumes replacement on every change. It does not recreate them every apply, only if any of the arguments change. I'll add tests and import then first. Thank you!
@magne for some reason when I'm trying to run local acceptance tests it fails to connect to docker image..
=== RUN TestAccUser_Local_Update_Roles
resource_user_test.go:320: Step 1/4 error: Error running apply: exit status 1
Error: unable to create login [user_update]: db connection failed after 30s timeout
with mssql_login.update,
on terraform_plugin_test.tf line 2, in resource "mssql_login" "update":
2: resource "mssql_login" "update" {
Any pointers on what might be happening here?
Ahh, I see now. I'm on a M2 Mac, so mssql just doesn't want to start up... Could use some help running/finalizing actual tests... Anyone please? :)
This PR introduces a new resource
mssql_database_permissions
that allows to manage permissions of a single user on the server.