1. Packages
  2. Grafana Cloud
  3. API Docs
  4. TeamExternalGroup
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

grafana.TeamExternalGroup

Explore with Pulumi AI

grafana logo
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse
    Deprecated: grafana.index/teamexternalgroup.TeamExternalGroup has been deprecated in favor of grafana.enterprise/teamexternalgroup.TeamExternalGroup

    Equivalent to the the team_sync attribute of the grafana.oss.Team resource. Use one or the other to configure a team’s external groups syncing config.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const myTeam = new grafana.oss.Team("my_team", {name: "My Team"});
    const test_team_group = new grafana.enterprise.TeamExternalGroup("test-team-group", {
        teamId: myTeam.id,
        groups: [
            "test-group-1",
            "test-group-2",
        ],
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    my_team = grafana.oss.Team("my_team", name="My Team")
    test_team_group = grafana.enterprise.TeamExternalGroup("test-team-group",
        team_id=my_team.id,
        groups=[
            "test-group-1",
            "test-group-2",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/enterprise"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myTeam, err := oss.NewTeam(ctx, "my_team", &oss.TeamArgs{
    			Name: pulumi.String("My Team"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = enterprise.NewTeamExternalGroup(ctx, "test-team-group", &enterprise.TeamExternalGroupArgs{
    			TeamId: myTeam.ID(),
    			Groups: pulumi.StringArray{
    				pulumi.String("test-group-1"),
    				pulumi.String("test-group-2"),
    			},
    		})
    		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 myTeam = new Grafana.Oss.Team("my_team", new()
        {
            Name = "My Team",
        });
    
        var test_team_group = new Grafana.Enterprise.TeamExternalGroup("test-team-group", new()
        {
            TeamId = myTeam.Id,
            Groups = new[]
            {
                "test-group-1",
                "test-group-2",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.oss.Team;
    import com.pulumi.grafana.oss.TeamArgs;
    import com.pulumi.grafana.enterprise.TeamExternalGroup;
    import com.pulumi.grafana.enterprise.TeamExternalGroupArgs;
    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 myTeam = new Team("myTeam", TeamArgs.builder()
                .name("My Team")
                .build());
    
            var test_team_group = new TeamExternalGroup("test-team-group", TeamExternalGroupArgs.builder()
                .teamId(myTeam.id())
                .groups(            
                    "test-group-1",
                    "test-group-2")
                .build());
    
        }
    }
    
    resources:
      myTeam:
        type: grafana:oss:Team
        name: my_team
        properties:
          name: My Team
      test-team-group:
        type: grafana:enterprise:TeamExternalGroup
        properties:
          teamId: ${myTeam.id}
          groups:
            - test-group-1
            - test-group-2
    

    Create TeamExternalGroup Resource

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

    Constructor syntax

    new TeamExternalGroup(name: string, args: TeamExternalGroupArgs, opts?: CustomResourceOptions);
    @overload
    def TeamExternalGroup(resource_name: str,
                          args: TeamExternalGroupArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamExternalGroup(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          groups: Optional[Sequence[str]] = None,
                          team_id: Optional[str] = None)
    func NewTeamExternalGroup(ctx *Context, name string, args TeamExternalGroupArgs, opts ...ResourceOption) (*TeamExternalGroup, error)
    public TeamExternalGroup(string name, TeamExternalGroupArgs args, CustomResourceOptions? opts = null)
    public TeamExternalGroup(String name, TeamExternalGroupArgs args)
    public TeamExternalGroup(String name, TeamExternalGroupArgs args, CustomResourceOptions options)
    
    type: grafana:TeamExternalGroup
    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 TeamExternalGroupArgs
    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 TeamExternalGroupArgs
    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 TeamExternalGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamExternalGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamExternalGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TeamExternalGroup 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 TeamExternalGroup resource accepts the following input properties:

    Groups List<string>
    The team external groups list
    TeamId string
    The Team ID
    Groups []string
    The team external groups list
    TeamId string
    The Team ID
    groups List<String>
    The team external groups list
    teamId String
    The Team ID
    groups string[]
    The team external groups list
    teamId string
    The Team ID
    groups Sequence[str]
    The team external groups list
    team_id str
    The Team ID
    groups List<String>
    The team external groups list
    teamId String
    The Team ID

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TeamExternalGroup Resource

    Get an existing TeamExternalGroup 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?: TeamExternalGroupState, opts?: CustomResourceOptions): TeamExternalGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            groups: Optional[Sequence[str]] = None,
            team_id: Optional[str] = None) -> TeamExternalGroup
    func GetTeamExternalGroup(ctx *Context, name string, id IDInput, state *TeamExternalGroupState, opts ...ResourceOption) (*TeamExternalGroup, error)
    public static TeamExternalGroup Get(string name, Input<string> id, TeamExternalGroupState? state, CustomResourceOptions? opts = null)
    public static TeamExternalGroup get(String name, Output<String> id, TeamExternalGroupState 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.
    The following state arguments are supported:
    Groups List<string>
    The team external groups list
    TeamId string
    The Team ID
    Groups []string
    The team external groups list
    TeamId string
    The Team ID
    groups List<String>
    The team external groups list
    teamId String
    The Team ID
    groups string[]
    The team external groups list
    teamId string
    The Team ID
    groups Sequence[str]
    The team external groups list
    team_id str
    The Team ID
    groups List<String>
    The team external groups list
    teamId String
    The Team ID

    Import

    $ pulumi import grafana:index/teamExternalGroup:TeamExternalGroup name "{{ teamID }}"
    
    $ pulumi import grafana:index/teamExternalGroup:TeamExternalGroup name "{{ orgID }}:{{ teamID }}"
    

    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.
    grafana logo
    Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse