» azurestack_storage_account

Manages an Azure Storage Account.

» Example Usage

resource "azurestack_resource_group" "testrg" {
  name     = "resourceGroupName"
  location = "westus"
}

resource "azurestack_storage_account" "testsa" {
  name                     = "storageaccountname"
  resource_group_name      = "${azurestack_resource_group.testrg.name}"
  location                 = "westus"
  account_tier             = "Standard"
  account_replication_type = "LRS"

  tags = {
    environment = "staging"
  }
}

» Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

  • resource_group_name - (Required) The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • account_kind - (Optional) Defines the Kind of account. Valid option is Storage. . Changing this forces a new resource to be created. Defaults to Storage currently as per Azure Stack Storage Differences

  • account_tier - (Required) Defines the Tier to use for this storage account. Valid options are Standard and Premium. Changing this forces a new resource to be created - Can be provisioned, but no performance limit or guarantee.

  • account_replication_type - (Required) Defines the type of replication to use for this storage account. Valid option is LRS currently as per Azure Stack Storage Differences

  • access_tier - (Required for BlobStorage accounts) Defines the access tier for BlobStorage accounts. Valid options are Hot and Cold, defaults to Hot. - Currently Not Supported on Azure Stack

  • account_encryption_source - (Optional) The Encryption Source for this Storage Account. Possible values are Microsoft.Keyvault and Microsoft.Storage. Defaults to Microsoft.Storage.

  • custom_domain - (Optional) A custom_domain block as documented below.

  • tags - (Optional) A mapping of tags to assign to the resource.


  • custom_domain supports the following:

  • name - (Optional) The Custom Domain Name to use for the Storage Account, which will be validated by Azure.

  • use_subdomain - (Optional) Should the Custom Domain Name be validated by using indirect CNAME validation?

» Attributes Reference

The following attributes are exported in addition to the arguments listed above:

» Import

Storage Accounts can be imported using the resource id, e.g.

terraform import azurestack_storage_account.storageAcc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount