# Reference for the teleport\_db\_object\_import\_rule Terraform data-source

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

## Schema

### Required

- `spec` (Attributes) spec represents the specifications for the database object import rule. (see [below for nested schema](#nested-schema-for-spec))
- `version` (String) The version of the resource being represented.

### Optional

- `metadata` (Attributes) Common metadata that all resources share. (see [below for nested schema](#nested-schema-for-metadata))
- `sub_kind` (String) Mandatory field for all resources. Not populated for this resource type.

### Nested Schema for `spec`

Optional:

- `database_labels` (Attributes List) db\_labels is a set of labels matched against database labels. (see [below for nested schema](#nested-schema-for-specdatabase_labels))
- `mappings` (Attributes List) mappings is a list of matches that will map match conditions to labels. (see [below for nested schema](#nested-schema-for-specmappings))
- `priority` (Number) priority represents the priority of the rule application. Rules are processed from lowest to highest priority. If two rules apply the same label, then the value applied with the rule with the highest priority wins.

### Nested Schema for `spec.database_labels`

Optional:

- `name` (String) The name of the label.
- `values` (List of String) The values associated with the label.

### Nested Schema for `spec.mappings`

Optional:

- `add_labels` (Map of String) add\_labels specifies which labels to add if the match succeeds. At least one should be present.
- `match` (Attributes) match specifies the matching rules, like the object names. (see [below for nested schema](#nested-schema-for-specmappingsmatch))
- `scope` (Attributes) scope specifies the object scope. Optional. If not provided, all scopes will be accepted. (see [below for nested schema](#nested-schema-for-specmappingsscope))

### Nested Schema for `spec.mappings.match`

Optional:

- `procedure_names` (List of String) procedure\_names specify the names of the procedures to match. Optional.
- `table_names` (List of String) table\_names specify the names of the tables to match. Optional.
- `view_names` (List of String) view\_names specify the names of the views to match. Optional.

### Nested Schema for `spec.mappings.scope`

Optional:

- `database_names` (List of String) database\_names specify the names of the databases to include in the scope. Optional.
- `schema_names` (List of String) schema\_names specify the names of the schemas to include in the scope. Optional.

### Nested Schema for `metadata`

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.
- `name` (String) name is an object name.
