1. Packages
  2. Grafana Cloud
  3. API Docs
  4. Team
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse

grafana.Team

Explore with Pulumi AI

Deprecated: grafana.index/team.Team has been deprecated in favor of grafana.oss/team.Team

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";

const viewer = new grafana.oss.User("viewer", {
    name: "Viewer",
    email: "viewer@example.com",
    login: "viewer",
    password: "my-password",
});
const test_team = new grafana.oss.Team("test-team", {
    name: "Test Team",
    email: "teamemail@example.com",
    members: [viewer.email],
});
Copy
import pulumi
import pulumiverse_grafana as grafana

viewer = grafana.oss.User("viewer",
    name="Viewer",
    email="viewer@example.com",
    login="viewer",
    password="my-password")
test_team = grafana.oss.Team("test-team",
    name="Test Team",
    email="teamemail@example.com",
    members=[viewer.email])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		viewer, err := oss.NewUser(ctx, "viewer", &oss.UserArgs{
			Name:     pulumi.String("Viewer"),
			Email:    pulumi.String("viewer@example.com"),
			Login:    pulumi.String("viewer"),
			Password: pulumi.String("my-password"),
		})
		if err != nil {
			return err
		}
		_, err = oss.NewTeam(ctx, "test-team", &oss.TeamArgs{
			Name:  pulumi.String("Test Team"),
			Email: pulumi.String("teamemail@example.com"),
			Members: pulumi.StringArray{
				viewer.Email,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumiverse.Grafana;

return await Deployment.RunAsync(() => 
{
    var viewer = new Grafana.Oss.User("viewer", new()
    {
        Name = "Viewer",
        Email = "viewer@example.com",
        Login = "viewer",
        Password = "my-password",
    });

    var test_team = new Grafana.Oss.Team("test-team", new()
    {
        Name = "Test Team",
        Email = "teamemail@example.com",
        Members = new[]
        {
            viewer.Email,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.oss.User;
import com.pulumi.grafana.oss.UserArgs;
import com.pulumi.grafana.oss.Team;
import com.pulumi.grafana.oss.TeamArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var viewer = new User("viewer", UserArgs.builder()
            .name("Viewer")
            .email("viewer@example.com")
            .login("viewer")
            .password("my-password")
            .build());

        var test_team = new Team("test-team", TeamArgs.builder()
            .name("Test Team")
            .email("teamemail@example.com")
            .members(viewer.email())
            .build());

    }
}
Copy
resources:
  viewer:
    type: grafana:oss:User
    properties:
      name: Viewer
      email: viewer@example.com
      login: viewer
      password: my-password
  test-team:
    type: grafana:oss:Team
    properties:
      name: Test Team
      email: teamemail@example.com
      members:
        - ${viewer.email}
Copy

Create Team Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Team(name: string, args?: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
         args: Optional[TeamArgs] = None,
         opts: Optional[ResourceOptions] = None)

@overload
def Team(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         email: Optional[str] = None,
         ignore_externally_synced_members: Optional[bool] = None,
         members: Optional[Sequence[str]] = None,
         name: Optional[str] = None,
         org_id: Optional[str] = None,
         preferences: Optional[TeamPreferencesArgs] = None,
         team_sync: Optional[TeamTeamSyncArgs] = None)
func NewTeam(ctx *Context, name string, args *TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs? args = null, CustomResourceOptions? opts = null)
public Team(String name, TeamArgs args)
public Team(String name, TeamArgs args, CustomResourceOptions options)
type: grafana:Team
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args TeamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TeamArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Team Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Team resource accepts the following input properties:

Email string
An email address for the team.
IgnoreExternallySyncedMembers bool
Members List<string>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
Name string
The display name for the Grafana team created.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Preferences Pulumiverse.Grafana.Inputs.TeamPreferences
TeamSync Pulumiverse.Grafana.Inputs.TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
Email string
An email address for the team.
IgnoreExternallySyncedMembers bool
Members []string
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
Name string
The display name for the Grafana team created.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Preferences TeamPreferencesArgs
TeamSync TeamTeamSyncArgs
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
email String
An email address for the team.
ignoreExternallySyncedMembers Boolean
members List<String>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name String
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferences
teamSync TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
email string
An email address for the team.
ignoreExternallySyncedMembers boolean
members string[]
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name string
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferences
teamSync TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
email str
An email address for the team.
ignore_externally_synced_members bool
members Sequence[str]
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name str
The display name for the Grafana team created.
org_id Changes to this property will trigger replacement. str
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferencesArgs
team_sync TeamTeamSyncArgs
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
email String
An email address for the team.
ignoreExternallySyncedMembers Boolean
members List<String>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name String
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences Property Map
teamSync Property Map
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API

Outputs

All input properties are implicitly available as output properties. Additionally, the Team resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
TeamId int
The team id assigned to this team by Grafana.
TeamUid string
The team uid assigned to this team by Grafana.
Id string
The provider-assigned unique ID for this managed resource.
TeamId int
The team id assigned to this team by Grafana.
TeamUid string
The team uid assigned to this team by Grafana.
id String
The provider-assigned unique ID for this managed resource.
teamId Integer
The team id assigned to this team by Grafana.
teamUid String
The team uid assigned to this team by Grafana.
id string
The provider-assigned unique ID for this managed resource.
teamId number
The team id assigned to this team by Grafana.
teamUid string
The team uid assigned to this team by Grafana.
id str
The provider-assigned unique ID for this managed resource.
team_id int
The team id assigned to this team by Grafana.
team_uid str
The team uid assigned to this team by Grafana.
id String
The provider-assigned unique ID for this managed resource.
teamId Number
The team id assigned to this team by Grafana.
teamUid String
The team uid assigned to this team by Grafana.

Look up Existing Team Resource

Get an existing Team resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        email: Optional[str] = None,
        ignore_externally_synced_members: Optional[bool] = None,
        members: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        preferences: Optional[TeamPreferencesArgs] = None,
        team_id: Optional[int] = None,
        team_sync: Optional[TeamTeamSyncArgs] = None,
        team_uid: Optional[str] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
resources:  _:    type: grafana:Team    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Email string
An email address for the team.
IgnoreExternallySyncedMembers bool
Members List<string>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
Name string
The display name for the Grafana team created.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Preferences Pulumiverse.Grafana.Inputs.TeamPreferences
TeamId int
The team id assigned to this team by Grafana.
TeamSync Pulumiverse.Grafana.Inputs.TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
TeamUid string
The team uid assigned to this team by Grafana.
Email string
An email address for the team.
IgnoreExternallySyncedMembers bool
Members []string
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
Name string
The display name for the Grafana team created.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Preferences TeamPreferencesArgs
TeamId int
The team id assigned to this team by Grafana.
TeamSync TeamTeamSyncArgs
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
TeamUid string
The team uid assigned to this team by Grafana.
email String
An email address for the team.
ignoreExternallySyncedMembers Boolean
members List<String>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name String
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferences
teamId Integer
The team id assigned to this team by Grafana.
teamSync TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
teamUid String
The team uid assigned to this team by Grafana.
email string
An email address for the team.
ignoreExternallySyncedMembers boolean
members string[]
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name string
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferences
teamId number
The team id assigned to this team by Grafana.
teamSync TeamTeamSync
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
teamUid string
The team uid assigned to this team by Grafana.
email str
An email address for the team.
ignore_externally_synced_members bool
members Sequence[str]
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name str
The display name for the Grafana team created.
org_id Changes to this property will trigger replacement. str
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences TeamPreferencesArgs
team_id int
The team id assigned to this team by Grafana.
team_sync TeamTeamSyncArgs
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
team_uid str
The team uid assigned to this team by Grafana.
email String
An email address for the team.
ignoreExternallySyncedMembers Boolean
members List<String>
A set of email addresses corresponding to users who should be given membership to the team. Note: users specified here must already exist in Grafana.
name String
The display name for the Grafana team created.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
preferences Property Map
teamId Number
The team id assigned to this team by Grafana.
teamSync Property Map
Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
teamUid String
The team uid assigned to this team by Grafana.

Supporting Types

TeamPreferences
, TeamPreferencesArgs

HomeDashboardUid string
The UID of the dashboard to display when a team member logs in.
Theme string
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
Timezone string
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
WeekStart string
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
HomeDashboardUid string
The UID of the dashboard to display when a team member logs in.
Theme string
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
Timezone string
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
WeekStart string
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
homeDashboardUid String
The UID of the dashboard to display when a team member logs in.
theme String
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
timezone String
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
weekStart String
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
homeDashboardUid string
The UID of the dashboard to display when a team member logs in.
theme string
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
timezone string
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
weekStart string
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
home_dashboard_uid str
The UID of the dashboard to display when a team member logs in.
theme str
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
timezone str
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
week_start str
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.
homeDashboardUid String
The UID of the dashboard to display when a team member logs in.
theme String
The default theme for this team. Available themes are light, dark, system, or an empty string for the default theme.
timezone String
The default timezone for this team. Available values are utc, browser, or an empty string for the default.
weekStart String
The default week start day for this team. Available values are sunday, monday, saturday, or an empty string for the default.

TeamTeamSync
, TeamTeamSyncArgs

Groups List<string>
Groups []string
groups List<String>
groups string[]
groups Sequence[str]
groups List<String>

Import

$ pulumi import grafana:index/team:Team name "{{ id }}"
Copy
$ pulumi import grafana:index/team:Team name "{{ orgID }}:{{ id }}"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
grafana pulumiverse/pulumi-grafana
License
Apache-2.0
Notes
This Pulumi package is based on the grafana Terraform Provider.