github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/examples/azure/terraform-azure-storage-example/README.md (about) 1 # Terraform Azure Storage Example 2 3 This folder contains a simple Terraform module that deploys resources in [Azure](https://azure.microsoft.com/) to demonstrate 4 how you can use TerraTest to write automated tests for your Azure Terraform code. This module deploys a 5 Storage Account. 6 7 - An [Azure Storage Account](https://azure.microsoft.com/services/storage/) that gives the module the following: 8 - [Stock Account Name](https://azure.microsoft.com/services/storage/) with the value specified in the `storage_account_name` output variable. 9 - [Storage Account Tier](https://azure.microsoft.com/services/storage/) with the value specified in the `"storage_account_account_tier` output variable. 10 - [Storage Account Kind](https://azure.microsoft.com/services/storage/) with the value specified in the `"storage_account_account_kind` output variable. 11 - [Storage Container](https://azure.microsoft.com/services/storage/) with the value specified in the `"storage_container_name` output variable. 12 13 Check out [test/azure/terraform_azure_storage_example_test.go](/test/azure/terraform_azure_storage_example_test.go) to see how you can write 14 automated tests for this module. 15 16 Note that the Storage Account in this module don't actually do anything; it just runs the resources for 17 demonstration purposes. 18 19 **WARNING**: This module and the automated tests for it deploy real resources into your Azure account which can cost you 20 money. The resources are all part of the [Azure Free Account](https://azure.microsoft.com/free/), so if you haven't used that up, 21 it should be free, but you are completely responsible for all Azure charges. 22 23 ## Running this module manually 24 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/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. Ensure [environment variables](../README.md#review-environment-variables) are available 30 1. Run `terraform init` 31 1. Run `terraform apply` 32 1. When you're done, run `terraform destroy` 33 34 ## Running automated tests against this module 35 36 1. Sign up for [Azure](https://azure.microsoft.com/) 37 1. Configure your Azure credentials using one of the [supported methods for Azure CLI 38 tools](https://docs.microsoft.com/cli/azure/azure-cli-configuration?view=azure-cli-latest) 39 1. Install [Terraform](https://www.terraform.io/) and make sure it's on your `PATH` 40 1. Configure your TerraTest [Go test environment](../README.md) 41 1. `cd test/azure` 42 1. `go build terraform_azure_storage_example_test.go` 43 1. `go test -v -run TestTerraformAzureStorageExample`