# linear_team (Resource)

Manages a Linear team — the container for issues, cycles, workflow states and templates.

Cycle configuration lives here rather than in a resource of its own: Linear generates cycles itself once `cycles_enabled` is set, so a cycle resource would fight the generator.

## Example Usage

```terraform
resource "linear_team" "engineering" {
  name = "Engineering"
  key  = "ENG"

  timezone       = "Europe/Berlin"
  triage_enabled = true

  cycles_enabled      = true
  cycle_duration      = 2
  cycle_cooldown_time = 0
  cycle_start_day     = 1

  issue_estimation_type = "fibonacci"
  auto_archive_period   = 3

  security_settings_json = jsonencode({
    labelManagement    = "admin"
    templateManagement = "member"
  })
}
```

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

### Required

- `name` (String) Name of the team.

### Optional

- `ai_discussion_summaries_enabled` (Boolean) Whether Linear summarises discussions for this team.
- `ai_thread_summaries_enabled` (Boolean) Whether Linear summarises long comment threads for this team.
- `all_members_can_join` (Boolean) Whether any workspace member can join the team without an invite.
- `auto_archive_period` (Number) Months of inactivity after which a closed issue is archived.
- `auto_close_child_issues` (Boolean) Whether closing a parent issue auto-closes its sub-issues.
- `auto_close_parent_issues` (Boolean) Whether closing every sub-issue auto-closes the parent.
- `auto_close_period` (Number) Months of inactivity after which an open issue is closed. Linear reports whether auto-closing is on at all, so removing the attribute keeps the live value rather than disabling it — set it explicitly to change it.
- `auto_close_state_id` (String) UUID of the workflow state auto-closed issues move to. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `color` (String) Colour of the team as a hex string.
- `cycle_cooldown_time` (Number) Cooldown between cycles in weeks.
- `cycle_duration` (Number) Length of a cycle in weeks.
- `cycle_issue_auto_assign_completed` (Boolean) Whether completing an issue assigns it to the active cycle.
- `cycle_issue_auto_assign_started` (Boolean) Whether starting an issue assigns it to the active cycle.
- `cycle_lock_to_active` (Boolean) Whether issues can only be assigned to the active cycle.
- `cycle_start_day` (Number) Weekday cycles start on, `0` being Sunday.
- `cycles_enabled` (Boolean) Whether Linear generates cycles for the team.
- `default_issue_estimate` (Number) Estimate given to an issue that has none.
- `default_issue_state_id` (String) UUID of the workflow state new issues start in. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `default_project_template_id` (String) UUID of the `linear_template` new projects of this team start from. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `default_template_for_members_id` (String) UUID of the `linear_template` used for issues created by team members. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `default_template_for_non_members_id` (String) UUID of the `linear_template` used for issues created by people outside the team. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `description` (String) Description of the team.
- `group_issue_history` (Boolean) Whether the issue history groups consecutive changes by the same author.
- `icon` (String) Icon of the team.
- `inherit_issue_estimation` (Boolean) Whether estimation settings are inherited from the parent team.
- `inherit_product_intelligence_scope` (Boolean) Whether the product intelligence scope is inherited from the parent team. **Write-only**, for the same reason as `product_intelligence_scope`.
- `inherit_slack_auto_create_project_channel` (Boolean) Whether the Slack project-channel setting is inherited from the parent team.
- `inherit_workflow_statuses` (Boolean) Whether workflow states are inherited from the parent team.
- `initiatives_enabled` (Boolean) Whether the team's projects can belong to initiatives.
- `issue_estimation_allow_zero` (Boolean) Whether `0` is a valid estimate.
- `issue_estimation_extended` (Boolean) Whether the estimation scale is extended with larger values.
- `issue_estimation_type` (String) Estimation scale — one of `notUsed`, `exponential`, `fibonacci`, `linear`, `tShirt`.
- `issue_sharing_enabled` (Boolean) Whether issues of this team can be shared with a public link. **Write-only**: `TeamCreateInput` and `TeamUpdateInput` both take it, but the team does not expose it, so drift in this attribute cannot be detected. Not to be confused with the `issueSharing` key of `security_settings_json`, which is the role allowed to share rather than whether sharing is on at all.
- `join_by_default` (Boolean) Whether new workspace members join this team automatically.
- `key` (String) Team key — the prefix of every issue identifier, e.g. `ENG` in `ENG-42`. Linear derives one from the name when unset.
- `parent_id` (String) UUID of the parent team this team nests under. Set it to `""` to unset the reference — leaving the attribute out of the configuration keeps whatever is live, so `""` is how a configuration asks for no reference at all.
- `private` (Boolean) Whether the team is private — visible only to its members.
- `product_intelligence_scope` (String) Scope product intelligence data is shared across — `none`, `team`, `teamHierarchy` or `workspace`. **Write-only**: Linear accepts it on the team input but does not expose it on the team, so drift in this attribute cannot be detected.
- `require_priority_to_leave_triage` (Boolean) Whether an issue needs a priority before it can leave triage.
- `security_settings_json` (String) Team security settings as a JSON object — which role may manage what, e.g. `jsonencode({ labelManagement = "admin", templateManagement = "member" })`. Keys: `agentSkillsManagement`, `automationManagement`, `issueSharing`, `labelManagement`, `memberManagement`, `teamManagement`, `templateManagement`. Compared semantically. **Not writable on every plan.** Every key here takes a team role, and team owners are not available on Linear's smaller plans; where they are not, `teamUpdate` refuses the attribute outright with `invalid input: team owners not available`. The gate is the attribute rather than its content — a workspace without team owners reports the live value as `{}` and rejects `{}` being sent back. Leave it out of the configuration there: an attribute the configuration never sets is never sent.
- `set_issue_sort_order_on_state_change` (String) Where an issue lands in the new state's list when its state changes — `top`, `bottom` or `noChange`.
- `slack_auto_create_project_channel` (Boolean) Whether Linear creates a Slack channel for each new project of this team.
- `timezone` (String) Timezone the team's cycles and SLAs are computed in, e.g. `Europe/Berlin`.
- `triage_enabled` (Boolean) Whether the team has a triage inbox for incoming issues.
- `upcoming_cycle_count` (Number) How many upcoming cycles Linear keeps generated ahead.

### Read-Only

- `id` (String) UUID of the team.

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# Import by UUID.
terraform import linear_team.example a1b2c3d4-0000-0000-0000-000000000000
```