github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/azurerm/r/storage_account.html.markdown (about)

     1  ---
     2  layout: "azurerm"
     3  page_title: "Azure Resource Manager: azurerm_storage_account"
     4  sidebar_current: "docs-azurerm-resource-storage-account"
     5  description: |-
     6    Create a Azure Storage Account.
     7  ---
     8  
     9  # azurerm\_storage\_account
    10  
    11  Create an Azure Storage Account.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "azurerm_resource_group" "testrg" {
    17    name     = "resourceGroupName"
    18    location = "westus"
    19  }
    20  
    21  resource "azurerm_storage_account" "testsa" {
    22    name                = "storageaccountname"
    23    resource_group_name = "${azurerm_resource_group.testrg.name}"
    24  
    25    location     = "westus"
    26    account_type = "Standard_GRS"
    27  
    28    tags {
    29      environment = "staging"
    30    }
    31  }
    32  ```
    33  
    34  ## Argument Reference
    35  
    36  The following arguments are supported:
    37  
    38  * `name` - (Required) Specifies the name of the storage account. Changing this forces a
    39      new resource to be created. This must be unique across the entire Azure service,
    40      not just within the resource group.
    41  
    42  * `resource_group_name` - (Required) The name of the resource group in which to
    43      create the storage account. Changing this forces a new resource to be created.
    44  
    45  * `location` - (Required) Specifies the supported Azure location where the
    46      resource exists. Changing this forces a new resource to be created.
    47  
    48  * `account_kind` - (Optional) Defines the Kind of account. Valid options are `Storage`
    49      and `BlobStorage`. Changing this forces a new resource to be created. Defaults
    50      to `Storage`.
    51  
    52  * `account_type` - (Required) Defines the type of storage account to be
    53      created. Valid options are `Standard_LRS`, `Standard_ZRS`, `Standard_GRS`,
    54      `Standard_RAGRS`, `Premium_LRS`. Changing this is sometimes valid - see the Azure
    55      documentation for more information on which types of accounts can be converted
    56      into other types.
    57  
    58  * `access_tier` - (Required for `BlobStorage` accounts) Defines the access tier
    59      for `BlobStorage` accounts. Valid options are `Hot` and `Cold`, defaults to
    60      `Hot`.
    61  
    62  * `enable_blob_encryption` - (Optional) Boolean flag which controls if Encryption
    63      Services are enabled for Blob storage, see [here](https://azure.microsoft.com/en-us/documentation/articles/storage-service-encryption/)
    64      for more information.
    65  
    66  * `tags` - (Optional) A mapping of tags to assign to the resource.
    67  
    68  Note that although the Azure API supports setting custom domain names for
    69  storage accounts, this is not currently supported.
    70  
    71  ## Attributes Reference
    72  
    73  The following attributes are exported in addition to the arguments listed above:
    74  
    75  * `id` - The storage account Resource ID.
    76  * `primary_location` - The primary location of the storage account.
    77  * `secondary_location` - The secondary location of the storage account.
    78  * `primary_blob_endpoint` - The endpoint URL for blob storage in the primary location.
    79  * `secondary_blob_endpoint` - The endpoint URL for blob storage in the secondary location.
    80  * `primary_queue_endpoint` - The endpoint URL for queue storage in the primary location.
    81  * `secondary_queue_endpoint` - The endpoint URL for queue storage in the secondary location.
    82  * `primary_table_endpoint` - The endpoint URL for table storage in the primary location.
    83  * `secondary_table_endpoint` - The endpoint URL for table storage in the secondary location.
    84  * `primary_file_endpoint` - The endpoint URL for file storage in the primary location.
    85  * `primary_access_key` - The primary access key for the storage account
    86  * `secondary_access_key` - The secondary access key for the storage account
    87  
    88  ## Import
    89  
    90  Storage Accounts can be imported using the `resource id`, e.g.
    91  
    92  ```
    93  terraform import azurerm_storage_account.storageAcc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
    94  ```
    95