On this page
azurestack_storage_account
Create 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 = "GRS"
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 options areStorage
,StorageV2
andBlobStorage
. Changing this forces a new resource to be created. Defaults toStorage
.account_tier
- (Required) Defines the Tier to use for this storage account. Valid options areStandard
andPremium
. Changing this forces a new resource to be createdaccount_replication_type
- (Required) Defines the type of replication to use for this storage account. Valid options areLRS
,GRS
,RAGRS
andZRS
.access_tier
- (Required forBlobStorage
accounts) Defines the access tier forBlobStorage
accounts. Valid options areHot
andCold
, defaults toHot
.account_encryption_source
- (Optional) The Encryption Source for this Storage Account. Possible values areMicrosoft.Keyvault
andMicrosoft.Storage
. Defaults toMicrosoft.Storage
.custom_domain
- (Optional) Acustom_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:
id
- The storage account Resource ID.primary_location
- The primary location of the storage account.secondary_location
- The secondary location of the storage account.primary_blob_endpoint
- The endpoint URL for blob storage in the primary location.secondary_blob_endpoint
- The endpoint URL for blob storage in the secondary location.primary_queue_endpoint
- The endpoint URL for queue storage in the primary location.secondary_queue_endpoint
- The endpoint URL for queue storage in the secondary location.primary_table_endpoint
- The endpoint URL for table storage in the primary location.secondary_table_endpoint
- The endpoint URL for table storage in the secondary location.primary_file_endpoint
- The endpoint URL for file storage in the primary location.primary_access_key
- The primary access key for the storage accountsecondary_access_key
- The secondary access key for the storage accountprimary_connection_string
- The connection string associated with the primary locationsecondary_connection_string
- The connection string associated with the secondary locationprimary_blob_connection_string
- The connection string associated with the primary blob locationsecondary_blob_connection_string
- The connection string associated with the secondary blob location
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
© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/azurestack/r/storage_account.html