coder / terraform-provider-coder

https://coder.com
Mozilla Public License 2.0
29 stars 17 forks source link

New `template` sharing option for `coder_app`s #236

Open stirby opened 3 months ago

stirby commented 3 months ago

Some users want to share coder_apps with a specific group or users, rather than all authenticated users on a deployment. We should support this with a new "template" share attribute for coder_apps.

This would open the app to any users who are granted access to the template. While this is a slightly convoluted method of sharing with groups, it best aligns with our current RBAC.

resource "coder_app" "vim" {
  agent_id     = coder_agent.dev.id
  slug         = "vim"
  ...
  share        = "template"  
}

Related: https://github.com/coder/coder/issues/13361

matifali commented 1 month ago

Looks like we once considered exactly this. https://github.com/coder/coder/pull/4378/commits/f8268e74d03f56d01fc462bf9ea46789aace88bf