github.com/leeprovoost/terraform@v0.6.10-0.20160119085442-96f3f76118e7/website/source/docs/providers/azurerm/index.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Provider: Azure Resource Manager" 4 sidebar_current: "docs-azurerm-index" 5 description: |- 6 The Azure Resource Manager provider is used to interact with the many resources supported by Azure, via the ARM API. This supercedes the Azure provider, which interacts with Azure using the Service Management API. The provider needs to be configured with a credentials file, or credentials needed to generate OAuth tokens for the ARM API. 7 --- 8 9 # Azure Resource Manager Provider 10 11 The Azure Resource Manager provider is used to interact with the many resources 12 supported by Azure, via the ARM API. This supercedes the Azure provider, which 13 interacts with Azure using the Service Management API. The provider needs to be 14 configured with the credentials needed to generate OAuth tokens for the ARM API. 15 16 Use the navigation to the left to read about the available resources. 17 18 ## Example Usage 19 20 ``` 21 # Configure the Azure Resource Manager Provider 22 provider "azurerm" { 23 subscription_id = "..." 24 client_id = "..." 25 client_secret = "..." 26 tenant_id = "..." 27 } 28 29 # Create a resource group 30 resource "azurerm_resource_group" "production" { 31 name = "production" 32 location = "West US" 33 } 34 35 # Create a virtual network in the web_servers resource group 36 resource "azurerm_virtual_network" "network" { 37 name = "productionNetwork" 38 address_space = ["10.0.0.0/16"] 39 location = "West US" 40 resource_group_name = "${azurerm_resource_group.production.name}" 41 42 subnet { 43 name = "subnet1" 44 address_prefix = "10.0.1.0/24" 45 } 46 47 subnet { 48 name = "subnet2" 49 address_prefix = "10.0.2.0/24" 50 } 51 52 subnet { 53 name = "subnet3" 54 address_prefix = "10.0.3.0/24" 55 } 56 } 57 58 ``` 59 60 ## Argument Reference 61 62 The following arguments are supported: 63 64 * `subscription_id` - (Optional) The subscription ID to use. It can also 65 be sourced from the `ARM_SUBSCRIPTION_ID` environment variable. 66 67 * `client_id` - (Optional) The client ID to use. It can also be sourced from 68 the `ARM_CLIENT_ID` environment variable. 69 70 * `client_secret` - (Optional) The client secret to use. It can also be sourced from 71 the `ARM_CLIENT_SECRET` environment variable. 72 73 * `tenant_id` - (Optional) The tenant ID to use. It can also be sourced from the 74 `ARM_TENANT_ID` environment variable. 75 76 ## Testing: 77 78 Credentials must be provided via the `ARM_SUBSCRIPTION_ID`, `ARM_CLIENT_ID`, 79 `ARM_CLIENT_SECRET` and `ARM_TENANT_ID` environment variables in order to run 80 acceptance tests.