# linear_time_schedule (Resource)

Manages a Linear time schedule — the on-call rota a `linear_triage_responsibility` rotates through.

Entries are absolute time windows, not a recurrence rule: Linear stores who is on call between two instants. A rota that repeats has to be generated, which is what the external schedule integrations do — point `external_id` and `external_url` at one to keep the provenance visible.

## Example Usage

```terraform
resource "linear_time_schedule" "oncall" {
  name = "Engineering on-call"

  entries = [
    {
      starts_at = "2026-01-05T09:00:00Z"
      ends_at   = "2026-01-12T09:00:00Z"
      user_id   = data.linear_user.alice.id
    },
    {
      starts_at = "2026-01-12T09:00:00Z"
      ends_at   = "2026-01-19T09:00:00Z"
      user_id   = data.linear_user.bob.id
    },
  ]
}
```

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

### Required

- `entries` (Attributes List) Shifts making up the rota. Sending this replaces every entry — there is no partial update. (see [below for nested schema](#nestedatt--entries))
- `name` (String) Name of the schedule.

### Optional

- `external_id` (String) Identifier of the schedule in the external system it mirrors.
- `external_url` (String) URL of the schedule in the external system it mirrors.

### Read-Only

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

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

Required:

- `ends_at` (String) When the shift ends, as an RFC 3339 timestamp.
- `starts_at` (String) When the shift starts, as an RFC 3339 timestamp.

Optional:

- `user_email` (String) Email of the user on call — useful when the person is not yet a workspace member. Set either this or `user_id`.
- `user_id` (String) UUID of the user on call. Set either this or `user_email`.

## 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_time_schedule.example a1b2c3d4-0000-0000-0000-000000000000
```