---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "forgejo_teams Data Source - terraform-provider-forgejo"
subcategory: ""
description: |-
  Use this data source to retrieve information about existing forgejo teams belonging to an organization.
---

# forgejo_teams (Data Source)

Use this data source to retrieve information about existing forgejo teams belonging to an organization.

## Example Usage

```terraform
data "forgejo_organizations" "main" {}

data "forgejo_teams" "main" {
  for_each = toset([for org in data.forgejo_organizations.main.elements :
    org.name
  ])

  organization_name = each.key
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `organization_name` (String) The name of the organization the teams are a part of.

### Read-Only

- `elements` (Attributes List) The list of teams for an organization. (see [below for nested schema](#nestedatt--elements))

<a id="nestedatt--elements"></a>
### Nested Schema for `elements`

Read-Only:

- `can_create_org_repo` (Boolean) Whether members of this team can create repositories that will belong to the organization.
- `description` (String) A description string.
- `id` (Number) The identifier of the team.
- `includes_all_repositories` (Boolean) Whether members of this team can access all the repositories that belong to the organization.
- `name` (String) The team's name are a part of.
- `permission` (String) The members' permission level on the organization.
- `units` (List of String) The list of units permissions.
- `units_map` (Map of String) The map of units permissions and their level.