grafana.oss.Team
Explore with Pulumi AI
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],
});
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])
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
})
}
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,
},
});
});
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());
}
}
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}
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)
type: grafana:oss:Team
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name 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 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 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 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 String
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var teamResource = new Grafana.Oss.Team("teamResource", new()
{
Email = "string",
IgnoreExternallySyncedMembers = false,
Members = new[]
{
"string",
},
Name = "string",
OrgId = "string",
Preferences = new Grafana.Oss.Inputs.TeamPreferencesArgs
{
HomeDashboardUid = "string",
Theme = "string",
Timezone = "string",
WeekStart = "string",
},
TeamSync = new Grafana.Oss.Inputs.TeamTeamSyncArgs
{
Groups = new[]
{
"string",
},
},
});
example, err := oss.NewTeam(ctx, "teamResource", &oss.TeamArgs{
Email: pulumi.String("string"),
IgnoreExternallySyncedMembers: pulumi.Bool(false),
Members: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
Preferences: &oss.TeamPreferencesArgs{
HomeDashboardUid: pulumi.String("string"),
Theme: pulumi.String("string"),
Timezone: pulumi.String("string"),
WeekStart: pulumi.String("string"),
},
TeamSync: &oss.TeamTeamSyncArgs{
Groups: pulumi.StringArray{
pulumi.String("string"),
},
},
})
var teamResource = new Team("teamResource", TeamArgs.builder()
.email("string")
.ignoreExternallySyncedMembers(false)
.members("string")
.name("string")
.orgId("string")
.preferences(TeamPreferencesArgs.builder()
.homeDashboardUid("string")
.theme("string")
.timezone("string")
.weekStart("string")
.build())
.teamSync(TeamTeamSyncArgs.builder()
.groups("string")
.build())
.build());
team_resource = grafana.oss.Team("teamResource",
email="string",
ignore_externally_synced_members=False,
members=["string"],
name="string",
org_id="string",
preferences={
"home_dashboard_uid": "string",
"theme": "string",
"timezone": "string",
"week_start": "string",
},
team_sync={
"groups": ["string"],
})
const teamResource = new grafana.oss.Team("teamResource", {
email: "string",
ignoreExternallySyncedMembers: false,
members: ["string"],
name: "string",
orgId: "string",
preferences: {
homeDashboardUid: "string",
theme: "string",
timezone: "string",
weekStart: "string",
},
teamSync: {
groups: ["string"],
},
});
type: grafana:oss:Team
properties:
email: string
ignoreExternallySyncedMembers: false
members:
- string
name: string
orgId: string
preferences:
homeDashboardUid: string
theme: string
timezone: string
weekStart: string
teamSync:
groups:
- string
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.
- Ignore
Externally boolSynced Members - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Preferences
Pulumiverse.
Grafana. Oss. Inputs. Team Preferences - Team
Sync Pulumiverse.Grafana. Oss. Inputs. Team Team Sync - 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.
- Ignore
Externally boolSynced Members - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Preferences
Team
Preferences Args - Team
Sync TeamTeam Sync Args - 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.
- ignore
Externally BooleanSynced Members - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences - team
Sync TeamTeam Sync - 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.
- ignore
Externally booleanSynced Members - 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.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences - team
Sync TeamTeam Sync - 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_ boolsynced_ members - 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 str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences Args - team_
sync TeamTeam Sync Args - 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.
- ignore
Externally BooleanSynced Members - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences Property Map
- team
Sync 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:
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
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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Email string
- An email address for the team.
- Ignore
Externally boolSynced Members - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Preferences
Pulumiverse.
Grafana. Oss. Inputs. Team Preferences - Team
Id int - The team id assigned to this team by Grafana.
- Team
Sync Pulumiverse.Grafana. Oss. Inputs. Team Team Sync - 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.
- Ignore
Externally boolSynced Members - 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.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Preferences
Team
Preferences Args - Team
Id int - The team id assigned to this team by Grafana.
- Team
Sync TeamTeam Sync Args - 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.
- ignore
Externally BooleanSynced Members - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences - team
Id Integer - The team id assigned to this team by Grafana.
- team
Sync TeamTeam Sync - 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.
- ignore
Externally booleanSynced Members - 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.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences - team
Id number - The team id assigned to this team by Grafana.
- team
Sync TeamTeam Sync - 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_ boolsynced_ members - 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 str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences
Team
Preferences Args - team_
id int - The team id assigned to this team by Grafana.
- team_
sync TeamTeam Sync Args - 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.
- ignore
Externally BooleanSynced Members - 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.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- preferences Property Map
- team
Id Number - The team id assigned to this team by Grafana.
- team
Sync Property Map - Sync external auth provider groups with this Grafana team. Only available in Grafana Enterprise. * Official documentation * HTTP API
Supporting Types
TeamPreferences, TeamPreferencesArgs
- Home
Dashboard stringUid - 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. - Week
Start string - The default week start day for this team. Available values are
sunday
,monday
,saturday
, or an empty string for the default.
- Home
Dashboard stringUid - 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. - Week
Start string - The default week start day for this team. Available values are
sunday
,monday
,saturday
, or an empty string for the default.
- home
Dashboard StringUid - 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. - week
Start String - The default week start day for this team. Available values are
sunday
,monday
,saturday
, or an empty string for the default.
- home
Dashboard stringUid - 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. - week
Start string - The default week start day for this team. Available values are
sunday
,monday
,saturday
, or an empty string for the default.
- home_
dashboard_ struid - 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.
- home
Dashboard StringUid - 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. - week
Start 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:oss/team:Team name "{{ id }}"
$ pulumi import grafana:oss/team:Team name "{{ orgID }}:{{ id }}"
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.