1. Packages
  2. Packages
  3. Datadog Provider
  4. API Docs
  5. TeamSync
Viewing docs for Datadog v5.4.0
published on Tuesday, Jun 2, 2026 by Pulumi
datadog logo
Viewing docs for Datadog v5.4.0
published on Tuesday, Jun 2, 2026 by Pulumi

    Provides a Datadog Team Sync resource. This can be used to configure team synchronization from external sources (e.g. GitHub) into Datadog.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Configure team synchronization from GitHub
    const example = new datadog.TeamSync("example", {
        source: "github",
        type: "link",
        frequency: "continuously",
        syncMembership: true,
        selectionStates: [{
            operation: "include",
            scope: "subtree",
            externalId: [{
                type: "organization",
                value: "12345",
            }],
        }],
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Configure team synchronization from GitHub
    example = datadog.TeamSync("example",
        source="github",
        type="link",
        frequency="continuously",
        sync_membership=True,
        selection_states=[{
            "operation": "include",
            "scope": "subtree",
            "external_id": [{
                "type": "organization",
                "value": "12345",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v5/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Configure team synchronization from GitHub
    		_, err := datadog.NewTeamSync(ctx, "example", &datadog.TeamSyncArgs{
    			Source:         pulumi.String("github"),
    			Type:           pulumi.String("link"),
    			Frequency:      pulumi.String("continuously"),
    			SyncMembership: pulumi.Bool(true),
    			SelectionStates: datadog.TeamSyncSelectionStateArray{
    				&datadog.TeamSyncSelectionStateArgs{
    					Operation: pulumi.String("include"),
    					Scope:     pulumi.String("subtree"),
    					ExternalId: datadog.TeamSyncSelectionStateExternalIdArgs{
    						map[string]interface{}{
    							"type":  "organization",
    							"value": "12345",
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Configure team synchronization from GitHub
        var example = new Datadog.TeamSync("example", new()
        {
            Source = "github",
            Type = "link",
            Frequency = "continuously",
            SyncMembership = true,
            SelectionStates = new[]
            {
                new Datadog.Inputs.TeamSyncSelectionStateArgs
                {
                    Operation = "include",
                    Scope = "subtree",
                    ExternalId = new[]
                    {
                        
                        {
                            { "type", "organization" },
                            { "value", "12345" },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.TeamSync;
    import com.pulumi.datadog.TeamSyncArgs;
    import com.pulumi.datadog.inputs.TeamSyncSelectionStateArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Configure team synchronization from GitHub
            var example = new TeamSync("example", TeamSyncArgs.builder()
                .source("github")
                .type("link")
                .frequency("continuously")
                .syncMembership(true)
                .selectionStates(TeamSyncSelectionStateArgs.builder()
                    .operation("include")
                    .scope("subtree")
                    .externalId(TeamSyncSelectionStateExternalIdArgs.builder()
                        .type("organization")
                        .value("12345")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Configure team synchronization from GitHub
      example:
        type: datadog:TeamSync
        properties:
          source: github
          type: link
          frequency: continuously
          syncMembership: true
          selectionStates:
            - operation: include
              scope: subtree
              externalId:
                - type: organization
                  value: '12345'
    
    pulumi {
      required_providers {
        datadog = {
          source = "pulumi/datadog"
        }
      }
    }
    
    # Configure team synchronization from GitHub
    resource "datadog_teamsync" "example" {
      source          = "github"
      type            = "link"
      frequency       = "continuously"
      sync_membership = true
      selection_states {
        operation = "include"
        scope     = "subtree"
        external_id = [{
          "type"  = "organization"
          "value" = "12345"
        }]
      }
    }
    

    Create TeamSync Resource

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

    Constructor syntax

    new TeamSync(name: string, args: TeamSyncArgs, opts?: CustomResourceOptions);
    @overload
    def TeamSync(resource_name: str,
                 args: TeamSyncArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def TeamSync(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 source: Optional[str] = None,
                 type: Optional[str] = None,
                 frequency: Optional[str] = None,
                 selection_states: Optional[Sequence[TeamSyncSelectionStateArgs]] = None,
                 sync_membership: Optional[bool] = None)
    func NewTeamSync(ctx *Context, name string, args TeamSyncArgs, opts ...ResourceOption) (*TeamSync, error)
    public TeamSync(string name, TeamSyncArgs args, CustomResourceOptions? opts = null)
    public TeamSync(String name, TeamSyncArgs args)
    public TeamSync(String name, TeamSyncArgs args, CustomResourceOptions options)
    
    type: datadog:TeamSync
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "datadog_teamsync" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TeamSyncArgs
    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 TeamSyncArgs
    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 TeamSyncArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TeamSyncArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TeamSyncArgs
    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 teamSyncResource = new Datadog.TeamSync("teamSyncResource", new()
    {
        Source = "string",
        Type = "string",
        Frequency = "string",
        SelectionStates = new[]
        {
            new Datadog.Inputs.TeamSyncSelectionStateArgs
            {
                ExternalId = new Datadog.Inputs.TeamSyncSelectionStateExternalIdArgs
                {
                    Type = "string",
                    Value = "string",
                },
                Operation = "string",
                Scope = "string",
            },
        },
        SyncMembership = false,
    });
    
    example, err := datadog.NewTeamSync(ctx, "teamSyncResource", &datadog.TeamSyncArgs{
    	Source:    pulumi.String("string"),
    	Type:      pulumi.String("string"),
    	Frequency: pulumi.String("string"),
    	SelectionStates: datadog.TeamSyncSelectionStateArray{
    		&datadog.TeamSyncSelectionStateArgs{
    			ExternalId: &datadog.TeamSyncSelectionStateExternalIdArgs{
    				Type:  pulumi.String("string"),
    				Value: pulumi.String("string"),
    			},
    			Operation: pulumi.String("string"),
    			Scope:     pulumi.String("string"),
    		},
    	},
    	SyncMembership: pulumi.Bool(false),
    })
    
    resource "datadog_teamsync" "teamSyncResource" {
      source    = "string"
      type      = "string"
      frequency = "string"
      selection_states {
        external_id = {
          type  = "string"
          value = "string"
        }
        operation = "string"
        scope     = "string"
      }
      sync_membership = false
    }
    
    var teamSyncResource = new TeamSync("teamSyncResource", TeamSyncArgs.builder()
        .source("string")
        .type("string")
        .frequency("string")
        .selectionStates(TeamSyncSelectionStateArgs.builder()
            .externalId(TeamSyncSelectionStateExternalIdArgs.builder()
                .type("string")
                .value("string")
                .build())
            .operation("string")
            .scope("string")
            .build())
        .syncMembership(false)
        .build());
    
    team_sync_resource = datadog.TeamSync("teamSyncResource",
        source="string",
        type="string",
        frequency="string",
        selection_states=[{
            "external_id": {
                "type": "string",
                "value": "string",
            },
            "operation": "string",
            "scope": "string",
        }],
        sync_membership=False)
    
    const teamSyncResource = new datadog.TeamSync("teamSyncResource", {
        source: "string",
        type: "string",
        frequency: "string",
        selectionStates: [{
            externalId: {
                type: "string",
                value: "string",
            },
            operation: "string",
            scope: "string",
        }],
        syncMembership: false,
    });
    
    type: datadog:TeamSync
    properties:
        frequency: string
        selectionStates:
            - externalId:
                type: string
                value: string
              operation: string
              scope: string
        source: string
        syncMembership: false
        type: string
    

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

    Source string
    The external source platform for team synchronization. Valid values are github.
    Type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    Frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    SelectionStates List<TeamSyncSelectionState>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    SyncMembership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    Source string
    The external source platform for team synchronization. Valid values are github.
    Type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    Frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    SelectionStates []TeamSyncSelectionStateArgs
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    SyncMembership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    source string
    The external source platform for team synchronization. Valid values are github.
    type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selection_states list(object)
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    sync_membership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    source String
    The external source platform for team synchronization. Valid values are github.
    type String
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency String
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates List<TeamSyncSelectionState>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    syncMembership Boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    source string
    The external source platform for team synchronization. Valid values are github.
    type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates TeamSyncSelectionState[]
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    syncMembership boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    source str
    The external source platform for team synchronization. Valid values are github.
    type str
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency str
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selection_states Sequence[TeamSyncSelectionStateArgs]
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    sync_membership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    source String
    The external source platform for team synchronization. Valid values are github.
    type String
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency String
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates List<Property Map>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    syncMembership Boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TeamSync 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 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 TeamSync Resource

    Get an existing TeamSync 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?: TeamSyncState, opts?: CustomResourceOptions): TeamSync
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            frequency: Optional[str] = None,
            selection_states: Optional[Sequence[TeamSyncSelectionStateArgs]] = None,
            source: Optional[str] = None,
            sync_membership: Optional[bool] = None,
            type: Optional[str] = None) -> TeamSync
    func GetTeamSync(ctx *Context, name string, id IDInput, state *TeamSyncState, opts ...ResourceOption) (*TeamSync, error)
    public static TeamSync Get(string name, Input<string> id, TeamSyncState? state, CustomResourceOptions? opts = null)
    public static TeamSync get(String name, Output<String> id, TeamSyncState state, CustomResourceOptions options)
    resources:  _:    type: datadog:TeamSync    get:      id: ${id}
    import {
      to = datadog_teamsync.example
      id = "${id}"
    }
    
    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:
    Frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    SelectionStates List<TeamSyncSelectionState>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    Source string
    The external source platform for team synchronization. Valid values are github.
    SyncMembership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    Type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    Frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    SelectionStates []TeamSyncSelectionStateArgs
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    Source string
    The external source platform for team synchronization. Valid values are github.
    SyncMembership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    Type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selection_states list(object)
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    source string
    The external source platform for team synchronization. Valid values are github.
    sync_membership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency String
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates List<TeamSyncSelectionState>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    source String
    The external source platform for team synchronization. Valid values are github.
    syncMembership Boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    type String
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency string
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates TeamSyncSelectionState[]
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    source string
    The external source platform for team synchronization. Valid values are github.
    syncMembership boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    type string
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency str
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selection_states Sequence[TeamSyncSelectionStateArgs]
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    source str
    The external source platform for team synchronization. Valid values are github.
    sync_membership bool
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    type str
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.
    frequency String
    How often the sync process should run. Valid values are once, continuously, paused. Defaults to "once".
    selectionStates List<Property Map>
    Specifies which teams or organizations to sync. When provided, synchronization is limited to the specified items and their subtrees.
    source String
    The external source platform for team synchronization. Valid values are github.
    syncMembership Boolean
    Whether to sync members from the external team to the Datadog team. Defaults to false.
    type String
    The type of synchronization operation. link connects teams by matching names. provision creates new teams when no match is found. Valid values are link, provision.

    Supporting Types

    TeamSyncSelectionState, TeamSyncSelectionStateArgs

    ExternalId TeamSyncSelectionStateExternalId
    The external identifier for a team or organization in the source platform.
    Operation string
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    Scope string
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    ExternalId TeamSyncSelectionStateExternalId
    The external identifier for a team or organization in the source platform.
    Operation string
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    Scope string
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    external_id object
    The external identifier for a team or organization in the source platform.
    operation string
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    scope string
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    externalId TeamSyncSelectionStateExternalId
    The external identifier for a team or organization in the source platform.
    operation String
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    scope String
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    externalId TeamSyncSelectionStateExternalId
    The external identifier for a team or organization in the source platform.
    operation string
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    scope string
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    external_id TeamSyncSelectionStateExternalId
    The external identifier for a team or organization in the source platform.
    operation str
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    scope str
    The scope of the selection. Valid values are subtree. Defaults to "subtree".
    externalId Property Map
    The external identifier for a team or organization in the source platform.
    operation String
    The operation to perform on the selected hierarchy. Valid values are include. Defaults to "include".
    scope String
    The scope of the selection. Valid values are subtree. Defaults to "subtree".

    TeamSyncSelectionStateExternalId, TeamSyncSelectionStateExternalIdArgs

    Type string
    The type of external identifier. Valid values are team, organization.
    Value string
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    Type string
    The type of external identifier. Valid values are team, organization.
    Value string
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    type string
    The type of external identifier. Valid values are team, organization.
    value string
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    type String
    The type of external identifier. Valid values are team, organization.
    value String
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    type string
    The type of external identifier. Valid values are team, organization.
    value string
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    type str
    The type of external identifier. Valid values are team, organization.
    value str
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).
    type String
    The type of external identifier. Valid values are team, organization.
    value String
    The external identifier value from the source platform (e.g. a GitHub organization ID or team ID).

    Import

    The pulumi import command can be used, for example:

    $ pulumi import datadog:index/teamSync:TeamSync example "github"
    

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

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Viewing docs for Datadog v5.4.0
    published on Tuesday, Jun 2, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial