PrefectHQ / terraform-provider-prefect

Terraform Provider for Prefect Cloud
https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs
Apache License 2.0
33 stars 16 forks source link

Granting teams access to workspaces #144

Closed mch-sb closed 6 months ago

mch-sb commented 7 months ago

Not really a bug, but rather a feature request. Want to grant teams access to workspaces. And would like a data source for getting the teams. Cant see it existing already.

Community Note

Terraform Version

0.1.1

Affected Resource(s)

Terraform Configuration Files

Want to do something like:

data "prefect_teams" "all_teams" {

}

resource "prefect_workspace_access_team" "viewers" {
  role = "viewer"
  team = # data.prefect_teams.all_teams filtered on some condition
}
resource "prefect_workspace_access_team" "viewers" {
  role = "owner"
  team = # data.prefect_teams.all_teams filtered on some condition
}

# alt. extending the existing prefect_workspace_access-resource
triedandtested-dev commented 6 months ago

I've created a PR for the above and am already using it.

introduced. data objects for team and provided a way to bind a role.

data "prefect_teams" "all_teams" {}