github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/examples/azure/terraform-azure-cosmosdb-example/README.md (about) 1 # Terraform Azure CosmosDB Example 2 3 This folder contains a complete Terraform Cosmos DB module that deploys resources in [Azure](https://azure.microsoft.com/) to demonstrate how you can use Terratest to write automated tests for your Azure Terraform code. This module deploys the following resources: 4 5 - A [Cosmos DB Account](https://azure.microsoft.com/services/cosmos-db/) configured with: 6 - A [SQL Database](https://docs.microsoft.com/en-gb/azure/cosmos-db/account-databases-containers-items#azure-cosmos-databases) 7 - Three [SQL Containers](https://docs.microsoft.com/en-gb/azure/cosmos-db/account-databases-containers-items#azure-cosmos-containers) 8 9 Check out [test/azure/terraform_azure_cosmosdb_example_test.go](./../../../test/azure/terraform_azure_cosmosdb_example_test.go) to see how you can write automated tests for this module and validate the configuration of the parameters and options. 10 11 **WARNING**: This module and the automated tests for it deploy real resources into your Azure account which can cost you money. 12 13 ## Running this module manually 14 15 1. Sign up for [Azure](https://azure.microsoft.com/). 16 1. Configure your Azure credentials using one of the [supported methods for Azure CLI 17 tools](https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest) 18 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`. 19 1. Ensure [environment variables](../README.md#review-environment-variables) are available 20 1. Run `terraform init` 21 1. Run `terraform apply` 22 1. When you're done, run `terraform destroy`. 23 24 ## Running automated tests against this module 25 26 1. Sign up for [Azure](https://azure.microsoft.com/) 27 1. Configure your Azure credentials using one of the [supported methods for Azure CLI 28 tools](https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest) 29 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH` 30 1. Configure your Terratest [Go test environment](../README.md) 31 1. `cd test/azure` 32 1. `go build terraform_azure_cosmosdb_example_test.go` 33 1. `go test -v -timeout 60m -tags azure -run TestTerraformAzureCosmosDBExample`