Skip to main content

Database Service V1 Reference

Report an IssueView as Markdown

Kind: db_service
Version: v1

The db_service resource represents an instance of the Teleport Database Service. When the Database Service starts, it registers a db_service resource. You can query this resource to see a list of Database Service instances and the dynamic resource matchers they are configured to use in order to proxy databases configured via the dynamic db resource.

To learn more about using the db_service and db resources, see Dynamic Database Registration.

Read the reference guide for the db resource.

Top-level fields

Example:

kind: "string"
sub_kind: "string"
version: "string"
metadata: # [...]
spec: # [...]
Field NameDescriptionType
kindA resource kindstring
metadataResource metadataMetadata
specThe resource spec.Database Service Spec V1
sub_kindAn optional resource sub kind, used in some resourcesstring
versionThe API version used to create the resource. It must be specified. Based on this version, Teleport will apply different defaults on resource creation or deletion. It must be an integer prefixed by "v". For example: v1string

Database Resource Matcher

A set of properties that is used to match on resources.

Example:

labels: # [...]
aws: # [...]
Field NameDescriptionType
awsResource Matcher AWS
labelsLabels

Database Service Spec V1

The DatabaseService Spec.

Example:

resources: 
  - # [...]
  - # [...]
  - # [...]
hostname: "string"
Field NameDescriptionType
hostnameThe hostname where this service is running.string
resourcesThe configured match for Database resources.[]Database Resource Matcher

Labels

A wrapper around map that can marshal and unmarshal itself from scalar and list values

Metadata

Resource metadata

Example:

name: "string"
description: "string"
labels: 
  "string": "string"
  "string": "string"
  "string": "string"
expires: # See description
revision: "string"
Field NameDescriptionType
descriptionObject descriptionstring
expiresA global expiry time header can be set on any resource in the system.
labelsA set of labelsmap[string]string
nameAn object namestring
revisionAn opaque identifier which tracks the versions of a resource over time. Clients should ignore and not alter its value but must return the revision in any updates of a resource.string

Resource Matcher AWS

Contains AWS specific settings for resource matcher.

Example:

assume_role_arn: "string"
external_id: "string"
Field NameDescriptionType
assume_role_arnAn optional AWS role ARN to assume when accessing a database.string
external_idAn optional AWS external ID used to enable assuming an AWS role across accounts.string