Create teams with external group sync
Creating teams with external group synchronization automates user access management. When users sign in through your identity provider, they’re automatically added to the appropriate Grafana teams based on their group memberships.
To create teams with external group sync, complete the following steps:
Create a file named
teams.tfin your Terraform directory.Add the team definitions with external group mappings:
resource "grafana_team" "finance" { name = "Finance" team_sync { groups = ["Finance"] } } resource "grafana_team" "marketing" { name = "Marketing" team_sync { groups = ["Marketing"] } } resource "grafana_team" "it" { name = "IT" team_sync { groups = ["IT"] } }Apply the configuration:
terraform applyWhen prompted, type
yesto confirm the changes.
The teams are created and configured to sync with your identity provider groups. Users in these groups are automatically added to the corresponding Grafana teams when they sign in.
In the next milestone, you’ll implement custom RBAC roles and label-based access controls.
