Skip to content

Data Source: azurermCosmosdbMongoDatabase

Use this data source to access information about an existing Cosmos DB Mongo Database.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermCosmosdbMongoDatabaseExample =
  new azurerm.dataAzurermCosmosdbMongoDatabase.DataAzurermCosmosdbMongoDatabase(
    this,
    "example",
    {
      account_name: "test-cosmosdb-account",
      name: "test-cosmosdb-mongo-db",
      resource_group_name: "test-cosmosdb-account-rg",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermCosmosdbMongoDatabaseExample.id,
});

Arguments Reference

The following arguments are supported:

  • accountName - (Required) The name of the Cosmos DB Account where the Mongo Database exists.

  • name - (Required) The name of this Cosmos DB Mongo Database.

  • resourceGroupName - (Required) The name of the Resource Group where the Cosmos DB Mongo Database exists.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Cosmos DB Mongo Database.

  • tags - A mapping of tags assigned to the Cosmos DB Mongo Database.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Cosmos Mongo Database.