github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/examples/azure/terraform-azure-sqldb-example/README.md (about) 1 # Terraform Azure SQL DB Example 2 3 This folder contains a Terraform 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 a SQL server, and a SQL database. 4 5 - A [SQL server](https://azure.microsoft.com/services/sql-database/campaign/) with the name specified in the `sql_server_name` variable. 6 - A [SQL Database](https://azure.microsoft.com/services/sql-database/) with the name specified in the `sql_database_name` variable. 7 8 Check out [test/azure/terraform_azure_sqldb_example_test.go](./../../../test/azure/terraform_azure_sqldb_example_test.go) to see how you can write automated tests for this module and validate the configuration of the parameters and options. 9 10 **WARNING**: This module and the automated tests for it deploy real resources into your Azure account which can cost you money. The resources are all part of the [Azure Free Account](https://azure.microsoft.com/en-us/free/), so if you haven't used that up, 11 it should be free, but you are completely responsible for all Azure charges. 12 13 ## Running this module manually 14 1. Sign up for [Azure](https://azure.microsoft.com/). 15 1. Configure your Azure credentials using one of the [supported methods for Azure CLI 16 tools](https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest) 17 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH`. 18 1. Ensure [environment variables](../README.md#review-environment-variables) are available 19 1. Run `terraform init` 20 1. Run `terraform apply` 21 1. When you're done, run `terraform destroy`. 22 23 24 ## Running automated tests against this module 25 1. Sign up for [Azure](https://azure.microsoft.com/) 26 1. Configure your Azure credentials using one of the [supported methods for Azure CLI 27 tools](https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest) 28 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH` 29 1. Configure your Terratest [Go test environment](../README.md) 30 1. `cd test/azure` 31 1. `go build terraform_azure_sqldb_example_test.go` 32 1. `go test -v -run TestTerraformAzureSQLDBExample`