turbot/mongodbatlas
steampipe plugin install mongodbatlas

Table: mongodbatlas_serverless_instance - Query MongoDB Atlas Serverless Instances using SQL

MongoDB Atlas Serverless Instances are a part of MongoDB's fully managed cloud database service. This service allows you to deploy, operate, and scale MongoDB databases in the cloud. Serverless instances provide on-demand, pay-per-use access to your MongoDB data, scaling automatically to meet your application's read and write workload needs.

Table Usage Guide

The mongodbatlas_serverless_instance table provides insights into the configuration and performance of MongoDB Atlas Serverless Instances. As a Database Administrator or Developer, you can use this table to examine details about these instances, including their configuration, status, and associated metrics. This can help you optimize resource usage, troubleshoot performance issues, and ensure the smooth operation of your MongoDB databases in the cloud.

Examples

Basic info

Explore which serverless instances are in use in your MongoDB Atlas setup. This can help you monitor and manage your resources more effectively.

select
id,
name
from
mongodbatlas_serverless_instance;
select
id,
name
from
mongodbatlas_serverless_instance;

Get connection details for serverless instances

Explore the connection details for your serverless instances to understand how to connect to them in different scenarios. This can be particularly useful when setting up new applications or troubleshooting connectivity issues.

select
id,
name,
connection_strings ->> 'standardSrv' as conn_str_standard_srv,
connection_strings ->> 'standard' as conn_str_standard
from
mongodbatlas_serverless_instance;
select
id,
name,
json_extract(connection_strings, '$.standardSrv') as conn_str_standard_srv,
json_extract(connection_strings, '$.standard') as conn_str_standard
from
mongodbatlas_serverless_instance;

List instances with provider backups disabled

Explore which serverless instances have provider backups disabled to identify potential data loss risks and prioritize areas for improved data security.

select
name,
cluster_type,
provider_backup_enabled
from
mongodbatlas_serverless_instance
where
provider_backup_enabled = false;
select
name,
cluster_type,
provider_backup_enabled
from
mongodbatlas_serverless_instance
where
provider_backup_enabled = 0;

Schema for mongodbatlas_serverless_instance

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
connection_stringsjsonbSet of connection strings that your applications use to connect to this cluster.
idtextUnique identifier of the cluster.
mongodb_versiontextVersion of MongoDB that the serverless instance runs, in <major version>.<minor version> format.
nametext=The name of the cluster as it appears in Atlas.
project_idtext=Unique identifier of the project that this cluster belongs to.
provider_settingsjsonbConfiguration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider.
state_nametextStage of deployment of this serverless instance when the resource made its request.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- mongodbatlas

You can pass the configuration to the command with the --config argument:

steampipe_export_mongodbatlas --config '<your_config>' mongodbatlas_serverless_instance