tailscale / terraform-provider-tailscale

Terraform provider for Tailscale
https://registry.terraform.io/providers/tailscale/tailscale
MIT License
255 stars 46 forks source link

Document that ACL tests are run when creating and updating tailscale_acl resources. #325

Closed dsymonds closed 7 months ago

dsymonds commented 7 months ago

Fixes #158. Closes #161.

dsymonds commented 7 months ago

@clstokes @davidsbond @knyar

I've tested this manually, but not sure how easy or useful it is to add a unit test.

knyar commented 7 months ago

Thank you! I might be missing something, but what does this achieve if validation is only called immediately before attempting to set ACL contents with the same value? The same validation (including tests) will be applied while ACL content is being set, and an error should be returned if any of the tests fail.

dsymonds commented 7 months ago

That's a good point! For some reason I thought this wasn't happening, but just tested it manually now and the tests do indeed get exercised.

Okay, let me pare this right back to just the documentation update.

dsymonds commented 7 months ago

PTAL @knyar

knyar commented 7 months ago

I think the markdown files get generated based on the source code, so I suspect you'd actually need to make the change in resource_acl.go and run go generate.

dsymonds commented 7 months ago

Ah ha! I overlooked the very subtle "generated" comment at the top. Done properly now.

PTAL @knyar