Atlas Agent Configuration
agent
agent attributes
| Name and description | Required | Value |
|---|---|---|
Atlas Cloud bot token to authenticate. | false | string |
agent blocks
agent.log
Logging configuration for the agent.
agent.log attributes
| Name and description | Required | Value |
|---|---|---|
Log output format. | false |
|
Log level for agent logs. | false |
|
agent.metrics
Configuration for metrics collection and reporting.
agent.metrics attributes
| Name | Required | Value |
|---|---|---|
enabled | false | bool |
port | false | int |
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 description | Required | Value |
|---|---|---|
Whether to include AlloyDB instances in the discovery. | false | List of strings |
Whether to include CloudSQL instances in the discovery. | false | List of strings |
GCP project id to query for database instances. | true | string |
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 description | Required | Value |
|---|---|---|
AWS region to query for RDS instances. | true | string |
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 description | Required | Value |
|---|---|---|
Regular expression to skip matching instance names. | false | string |
Exclude instances matching these tags. | false | map |
Regular expression to include mathing instance names. | false | string |
Tags to filter by. | false | map |
instance
Database instance configuration.
instance attributes
| Name and description | Required | Value |
|---|---|---|
Database driver name. | true |
|
Optional metadata for the instance. | false | map |
Human friendly name for the instance. | false | string |
Unique identifier for the instance. | false | string |
Optional tags to organize and categorize instances. | false | map |
instance blocks
instance.connection
Connection settings for the instance.
instance.connection attributes
| Name and description | Required | Value |
|---|---|---|
Default database name. | false | string |
Database host address. | false | string |
the path for the database. | false | string |
Database port number. | false | int |
Connection query parameters. | false | map |
Database user name. | false | string |
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 description | Required | Value |
|---|---|---|
IAM role to assume for token retrieval. | false | string |
AWS RDS endpoint. | true | string |
AWS region for the RDS IAM endpoint. | true | string |
instance.connection.auth.aws_secrets_manager
AWS Secrets Manager authentication settings.
instance.connection.auth.aws_secrets_manager attributes
| Name and description | Required | Value |
|---|---|---|
Key in the secret JSON object that contains the password. | false | string |
Name of the secret in AWS Secrets Manager. | true | string |
AWS region where the secret is stored. | true | string |
instance.connection.auth.env_var
Reading database password from an environment variable.
instance.connection.auth.env_var constraints
| Constraint | Value |
|---|---|
| Required | false |
Require Name (e.g., instance.connection.auth.env_var "name" ) | true |
instance.connection.auth constraints
| Constraint | Value |
|---|---|
| Required | false |
| Require Name | false |
| Mutually exclusive sets | [env_var, aws_iam, aws_secrets_manager] |
| One of required sets | [env_var, aws_iam, aws_secrets_manager] |
instance.connection constraints
| Constraint | Value |
|---|---|
| Required | true |
| Require Name | false |
instance.default_monitor
The default_monitor block is deprecated. Use top-level monitor blocks instead.
instance.default_monitor attributes
| Name and description | Required | Value |
|---|---|---|
Default database for monitoring. | false | string |
List of exclusion patterns. | false | List of strings |
List of databases to exclude from default monitoring. | false | List of strings |
List of inclusion patterns. | false | List of strings |
Initial database to connect to in order to fetch a list of available databases. | false | string |
List of schemas to monitor. | false | List of strings |
The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m. | false | string |
instance.default_monitor blocks
instance.default_monitor.statistics
Statistics collection settings.
instance.default_monitor.statistics attributes
| Name and description | Required | Value |
|---|---|---|
Enable or disable statistics collection. | true | bool |
instance.default_monitor constraints
| Constraint | Value |
|---|---|
| Required | false |
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 description | Required | Value |
|---|---|---|
Database to monitor. | false | string |
List of exclusion patterns. | false | List of strings |
List of inclusion patterns. | false | List of strings |
Instance to monitor. | false | Object reference to |
List of schemas to monitor. | false | List of strings |
The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m. | false | string |
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
| Name | Required | Value |
|---|---|---|
instance | true | string |
name | false | string |
instance.monitor.drift_check.compare_to.monitor constraints
| Constraint | Value |
|---|---|
| Required | true |
instance.monitor.drift_check.compare_to.repo
instance.monitor.drift_check.compare_to.repo attributes
| Name | Required | Value |
|---|---|---|
env | true | string |
name | false | string |
instance.monitor.drift_check.compare_to.repo constraints
| Constraint | Value |
|---|---|
| Required | true |
instance.monitor.drift_check constraints
| Constraint | Value |
|---|---|
| Required | false |
Require Name (e.g., instance.monitor.drift_check "name" ) | true |
| Repeatable | true |
instance.monitor.statistics
Statistics collection settings.
instance.monitor.statistics attributes
| Name and description | Required | Value |
|---|---|---|
Enable or disable statistics collection. | true | bool |
instance.monitor constraints
| Constraint | Value |
|---|---|
| Required | false |
Require Name (e.g., instance.monitor "name" ) | true |
instance constraints
| Constraint | Value |
|---|---|
| Required | false |
| Require Name | false |
| Repeatable | true |
monitor
Monitoring configuration for a specific database or schema.
monitor attributes
| Name and description | Required | Value |
|---|---|---|
Database to monitor. | false | string |
List of exclusion patterns. | false | List of strings |
List of inclusion patterns. | false | List of strings |
Instance to monitor. | true | Object reference to |
Human friendly name for the instance. | false | string |
List of schemas to monitor. | false | List of strings |
The interval at which snapshots are taken, e.g. 1h, 1d. Minimum is 1m. | false | string |
monitor blocks
monitor.drift_check
monitor.drift_check blocks
monitor.drift_check.compare_to.monitor
monitor.drift_check.compare_to.monitor attributes
| Name | Required | Value |
|---|---|---|
instance | true | string |
name | false | string |
monitor.drift_check.compare_to.monitor constraints
| Constraint | Value |
|---|---|
| Required | true |
monitor.drift_check.compare_to.repo
monitor.drift_check.compare_to.repo attributes
| Name | Required | Value |
|---|---|---|
env | true | string |
name | false | string |
monitor.drift_check.compare_to.repo constraints
| Constraint | Value |
|---|---|
| Required | true |
monitor.drift_check constraints
| Constraint | Value |
|---|---|
| Required | false |
Require Name (e.g., monitor.drift_check "name" ) | true |
| Repeatable | true |
monitor.statistics
Statistics collection settings.
monitor.statistics attributes
| Name and description | Required | Value |
|---|---|---|
Enable or disable statistics collection. | true | bool |
monitor constraints
| Constraint | Value |
|---|---|
| Required | false |
| Require Name | false |
| Repeatable | true |