# Reference for the teleport\_access\_monitoring\_rule Terraform data-source

This page describes the supported values of the `teleport_access_monitoring_rule` data source of the Teleport Terraform provider.

## Schema

### Required

- `spec` (Attributes) Spec is an AccessMonitoringRule specification (see [below for nested schema](#nested-schema-for-spec))
- `version` (String) version is version

### Optional

- `metadata` (Attributes) metadata is the rules's metadata. (see [below for nested schema](#nested-schema-for-metadata))
- `sub_kind` (String) sub\_kind is an optional resource sub kind, used in some resources

### Nested Schema for `spec`

Required:

- `subjects` (List of String) subjects the rule operates on, can be a resource kind or a particular resource property.

Optional:

- `automatic_review` (Attributes) automatic\_review defines automatic review configurations for Access Requests. Both notification and automatic\_review may be set within the same access\_monitoring\_rule. If both fields are set, the rule will trigger both notifications and automatic reviews for the same set of access events. Separate plugins may be used if both notifications and automatic\_reviews is set. (see [below for nested schema](#nested-schema-for-specautomatic_review))
- `condition` (String) condition is a predicate expression that operates on the specified subject resources, and determines whether the subject will be moved into desired state.
- `desired_state` (String) desired\_state defines the desired state of the subject. For Access Request subjects, the desired\_state may be set to `reviewed` to indicate that the Access Request should be automatically reviewed.
- `notification` (Attributes) notification defines the plugin configuration for notifications if rule is triggered. Both notification and automatic\_review may be set within the same access\_monitoring\_rule. If both fields are set, the rule will trigger both notifications and automatic reviews for the same set of access events. Separate plugins may be used if both notifications and automatic\_reviews is set. (see [below for nested schema](#nested-schema-for-specnotification))
- `schedules` (Attributes Map) schedules specifies a map of schedules that can be used to configure the access monitoring rule conditions. Available in Teleport v18.2.8 or higher. (see [below for nested schema](#nested-schema-for-specschedules))
- `states` (List of String) states are the desired state which the monitoring rule is attempting to bring the subjects matching the condition to.

### Nested Schema for `spec.automatic_review`

Optional:

- `decision` (String) decision specifies the proposed state of the access review. This can be either 'APPROVED' or 'DENIED'.
- `integration` (String) integration is the name of the integration that is responsible for monitoring the rule. Set this value to `builtin` to monitor the rule with Teleport.

### Nested Schema for `spec.notification`

Optional:

- `name` (String) name is the name of the plugin to which this configuration should apply.
- `recipients` (List of String) recipients is the list of recipients the plugin should notify.

### Nested Schema for `spec.schedules`

Optional:

- `time` (Attributes) TimeSchedule specifies an in-line schedule. (see [below for nested schema](#nested-schema-for-specschedulestime))

### Nested Schema for `spec.schedules.time`

Optional:

- `shifts` (Attributes List) Shifts contains a set of shifts that make up the schedule. (see [below for nested schema](#nested-schema-for-specschedulestimeshifts))
- `timezone` (String) Timezone specifies the schedule timezone. This field is optional and defaults to "UTC". Accepted values use timezone locations as defined in the IANA Time Zone Database, such as "America/Los\_Angeles", "Europe/Lisbon", or "Asia/Singapore". See <https://data.iana.org/time-zones/tzdb/zone1970.tab> for a list of supported values.

### Nested Schema for `spec.schedules.time.shifts`

Optional:

- `end` (String) End specifies the end time in the format HH:MM, e.g., "12:30".
- `start` (String) Start specifies the start time in the format HH:MM, e.g., "12:30".
- `weekday` (String) Weekday specifies the day of the week, e.g., "Sunday", "Monday", "Tuesday".

### Nested Schema for `metadata`

Required:

- `name` (String) name is an object name.

Optional:

- `description` (String) description is object description.
- `expires` (String) expires is a global expiry time header can be set on any resource in the system.
- `labels` (Map of String) labels is a set of labels.
