coder / terraform-provider-coderd

Manage a Coder deployment using Terraform
https://registry.terraform.io/providers/coder/coderd/latest/docs
Mozilla Public License 2.0
10 stars 2 forks source link

fix: correctly patch template acl #90

Closed ethanndickson closed 2 months ago

ethanndickson commented 2 months ago

The provider currently does not remove users or groups from template ACL when applying a config. This was unfortunately missed by tests, but caught by our use of the provider to manage our dogfood template.

Merely omitting a ACL item in a coderd API request is not enough to delete it, the role string must be set to an empty string. ACL items will now be deleted from the template when they are removed from the config and applied.

ethanndickson commented 2 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ethanndickson and the rest of your teammates on Graphite Graphite

matifali commented 2 months ago

Should we also provide/update the example to demonstrate this (if not done already)?

ethanndickson commented 2 months ago

No, this PR just gives users the expected behavior that when they omit an ACL item from the list in their Terraform config, it will get deleted.