Azure Cosmos DB is a globally distributed database service. Thanks to Terraform, you can easily deploy Cosmos DB accounts and resources with just a few lines of HCL code.

We’ll do this by using Terraform to deploy Azure Cosmos DB to Azure Container Instances. First we’ll learn how to create an Azure Cosmos DB instance, then update the configuration to create an Azure Container Instance, and finally create a simple application that works with both these resources.

Once we have defined our three resources it is time to apply our configuration and create our Cosmos DB instance.

Related Articles