AutoMerge is generally available

Last updated:

dash0_team

Terraform data source that looks up a Dash0 team by display name or id, so a team Terraform does not manage, such as one synced from your identity provider, can be granted access to a dataset.

Looks up a Dash0 team by its display name or id. Use it to reference a team that Terraform does not manage, such as a team synced from your identity provider, for example as the teamId of a grant in spec.permissions of a dash0_dataset.

Set exactly one of name or id. Dash0 allows two teams to have the same display name. When more than one team has the name, the lookup fails and lists their ids, so you can look the team up by id instead.

Example Usage

terraform
# Look up a team that Terraform does not manage, for example a team synced
# from your identity provider, by its display name. The match is exact and
# case-sensitive. The lookup fails when no team has the name, or when more
# than one team has it. In that case, look the team up by id instead.
data "dash0_team" "payments" {
  name = "Payments"
}

# Grant the team access to a dataset.
resource "dash0_dataset" "payments" {
  dataset_yaml = <<-YAML
apiVersion: dash0.com/v1alpha1
kind: Dash0Dataset
metadata:
  name: Payments
spec:
  permissions:
    - teamId: ${data.dash0_team.payments.id}
      actions: [dataset:read]
YAML
}

# Look up a team by id instead of by name.
data "dash0_team" "platform" {
  id = "team_01h455vb4pex5vsknk084sn02q"
}

Schema

Optional

  • id (String) The id of the team, for example team_01h455vb4pex5vsknk084sn02q. Set it to look up the team by id instead of by name.
  • name (String) The display name of the team, as shown in Dash0. The match is exact and case-sensitive.

Read-Only

  • member_count (Number) The number of members in the team.
  • origin (String) The external identifier of the team, set by the tool that created it. Null for teams created in the Dash0 UI.