Skip to main content

Atlas Agent Configuration

agent

agent attributes

Name and descriptionRequiredValue

token

Atlas Cloud bot token to authenticate.

falsestring

agent blocks

agent.log

Logging configuration for the agent.

agent.log attributes
Name and descriptionRequiredValue

format

Log output format.

false

enum (TEXT, JSON)

level

Log level for agent logs.

false

enum (DEBUG, INFO, WARN, ERROR)

agent.metrics

Configuration for metrics collection and reporting.

agent.metrics attributes
NameRequiredValue
enabledfalsebool
portfalseint

data gcp_discovery

The gcp_discovery data source calls the GCP API to retrieve a list of available CloudSQL, AlloyDB, and Spanner instances and clusters.

data "gcp_discovery" "prod" {
project = "foo-bar-123456-g2"
cloudsql = true
spanner = true
alloydb = false
filter {
name_regex = ".*-prod$"
}
}

data.gcp_discovery attributes

Name and descriptionRequiredValue

alloydb

Whether to include AlloyDB instances in the discovery.

false

List of strings

cloudsql

Whether to include CloudSQL instances in the discovery.

false

List of strings

project

GCP project id to query for database instances.

truestring

spanner

Whether to include Spanner instances in the discovery.

false

List of strings

data rds_discovery

The rds_discovery data source calls the AWS RDS API to retrieve a list of available RDS instances and clusters.

data "rds_discovery" "prod" {
region = "us-east-1"
roles = [
"arn:aws:iam::123456789012:role/AtlasRDSRole",
"arn:aws:iam::123456789012:role/AnotherAtlasRDSRole",
]
filter {
tags = {
Environment = "production"
}
name_regex = ".*-prod$"
}
}

data.rds_discovery attributes

Name and descriptionRequiredValue

region

AWS region to query for RDS instances.

truestring

roles

List of IAM role ARNs to assume when accessing AWS RDS API.

false

List of strings

data.rds_discovery blocks

data.filter

Filter to apply when discovering RDS instances.

data.filter attributes
Name and descriptionRequiredValue

exclude_name_regex

Regular expression to skip matching instance names.

falsestring

exclude_tags

Exclude instances matching these tags.

falsemap

name_regex

Regular expression to include mathing instance names.

falsestring

tags

Tags to filter by.

falsemap

instance

Database instance configuration.

instance attributes

Name and descriptionRequiredValue

driver

Database driver name.

true

enum (azuresql, clickhouse, databricks, libsql, libsql+file, libsql+ws, libsql+wss, maria, maria+unix, mariadb, mariadb+unix, mssql, mysql, mysql+unix, oracle, postgres, postgresql, cockroachdb, crdb, redshift, redshift+http, snowflake, spanner, sqlite, sqlite3, sqlserver, aurora-mysql, aurora-postgresql)

metadata

Optional metadata for the instance.

falsemap

name

Human friendly name for the instance.

falsestring

slug

Unique identifier for the instance.

falsestring

tags

Optional tags to organize and categorize instances.

falsemap

instance blocks

instance.connection

Connection settings for the instance.

instance.connection attributes
Name and descriptionRequiredValue

database

Default database name.

falsestring

host

Database host address.

falsestring

path

the path for the database.

falsestring

port

Database port number.

falseint

query

Connection query parameters.

falsemap

user

Database user name.

falsestring
instance.connection blocks

instance.connection.auth

Authentication configuration for connections.

instance.connection.auth blocks

instance.connection.auth.aws_iam

AWS IAM authentication settings.

instance.connection.auth.aws_iam attributes
Name and descriptionRequiredValue

assume_role

IAM role to assume for token retrieval.

falsestring

endpoint

AWS RDS endpoint.

truestring

region

AWS region for the RDS IAM endpoint.

truestring

instance.connection.auth.aws_secrets_manager

AWS Secrets Manager authentication settings.

instance.connection.auth.aws_secrets_manager attributes
Name and descriptionRequiredValue

key

Key in the secret JSON object that contains the password.

falsestring

name

Name of the secret in AWS Secrets Manager.

truestring

region

AWS region where the secret is stored.

truestring

instance.connection.auth.env_var

Reading database password from an environment variable.

instance.connection.auth.env_var constraints
ConstraintValue
Requiredfalse
Require Name (e.g., instance.connection.auth.env_var "name" )true
instance.connection.auth constraints
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[env_var, aws_iam, aws_secrets_manager]
One of required sets[env_var, aws_iam, aws_secrets_manager]
instance.connection constraints
ConstraintValue
Requiredtrue
Require Namefalse

instance.default_monitor

The default_monitor block is deprecated. Use top-level monitor blocks instead.

instance.default_monitor attributes
Name and descriptionRequiredValue

database

Default database for monitoring.

falsestring

exclude

List of exclusion patterns.

false

List of strings

exclude_databases

List of databases to exclude from default monitoring.

false

List of strings

include

List of inclusion patterns.

false

List of strings

initial_database

Initial database to connect to in order to fetch a list of available databases.

falsestring

schemas

List of schemas to monitor.

false

List of strings

snapshot_interval

The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m.

falsestring
instance.default_monitor blocks

instance.default_monitor.statistics

Statistics collection settings.

instance.default_monitor.statistics attributes
Name and descriptionRequiredValue

enabled

Enable or disable statistics collection.

truebool
instance.default_monitor constraints
ConstraintValue
Requiredfalse
Require Name (e.g., instance.default_monitor "name" )true

instance.monitor

The monitor block inside instance is deprecated. Move it to top-level and set instance = instance.<name>.

instance.monitor attributes
Name and descriptionRequiredValue

database

Database to monitor.

falsestring

exclude

List of exclusion patterns.

false

List of strings

include

List of inclusion patterns.

false

List of strings

instance

Instance to monitor.

false

Object reference to instance

schemas

List of schemas to monitor.

false

List of strings

snapshot_interval

The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m.

falsestring
instance.monitor blocks

instance.monitor.drift_check

instance.monitor.drift_check blocks

instance.monitor.drift_check.compare_to.monitor

instance.monitor.drift_check.compare_to.monitor attributes
NameRequiredValue
instancetruestring
namefalsestring
instance.monitor.drift_check.compare_to.monitor constraints
ConstraintValue
Requiredtrue

instance.monitor.drift_check.compare_to.repo

instance.monitor.drift_check.compare_to.repo attributes
NameRequiredValue
envtruestring
namefalsestring
instance.monitor.drift_check.compare_to.repo constraints
ConstraintValue
Requiredtrue
instance.monitor.drift_check constraints
ConstraintValue
Requiredfalse
Require Name (e.g., instance.monitor.drift_check "name" )true
Repeatabletrue

instance.monitor.statistics

Statistics collection settings.

instance.monitor.statistics attributes
Name and descriptionRequiredValue

enabled

Enable or disable statistics collection.

truebool
instance.monitor constraints
ConstraintValue
Requiredfalse
Require Name (e.g., instance.monitor "name" )true

instance constraints

ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

monitor

Monitoring configuration for a specific database or schema.

monitor attributes

Name and descriptionRequiredValue

database

Database to monitor.

falsestring

exclude

List of exclusion patterns.

false

List of strings

include

List of inclusion patterns.

false

List of strings

instance

Instance to monitor.

true

Object reference to instance

name

Human friendly name for the instance.

falsestring

schemas

List of schemas to monitor.

false

List of strings

snapshot_interval

The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m.

falsestring

monitor blocks

monitor.drift_check

monitor.drift_check blocks

monitor.drift_check.compare_to.monitor

monitor.drift_check.compare_to.monitor attributes
NameRequiredValue
instancetruestring
namefalsestring
monitor.drift_check.compare_to.monitor constraints
ConstraintValue
Requiredtrue

monitor.drift_check.compare_to.repo

monitor.drift_check.compare_to.repo attributes
NameRequiredValue
envtruestring
namefalsestring
monitor.drift_check.compare_to.repo constraints
ConstraintValue
Requiredtrue
monitor.drift_check constraints
ConstraintValue
Requiredfalse
Require Name (e.g., monitor.drift_check "name" )true
Repeatabletrue

monitor.statistics

Statistics collection settings.

monitor.statistics attributes
Name and descriptionRequiredValue

enabled

Enable or disable statistics collection.

truebool

monitor constraints

ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue