azurerm_storage_share

Manages a File Share within Azure Storage.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "azuretest"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "azureteststorage"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_storage_share" "example" {
  name                 = "sharename"
  storage_account_name = azurerm_storage_account.example.name
  quota                = 50

  acl {
    id = "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"

    access_policy {
      permissions = "rwdl"
      start       = "2019-07-02T09:38:21.0000000Z"
      expiry      = "2019-07-02T10:38:21.0000000Z"
    }
  }
}

Argument Reference

The following arguments are supported:

~>NOTE: The FileStorage account_kind of the azurerm_storage_account requires Premium access_tier.

~>NOTE: The FileStorage account_kind of the azurerm_storage_account is required for the NFS protocol.

~>NOTE: For Standard storage accounts, by default this must be 1 GB (or higher) and at most 5120 GB (5 TB). This can be set to a value larger than 5120 GB if large_file_share_enabled is set to true in the parent azurerm_storage_account.

~>NOTE: For Premium FileStorage storage accounts, this must be greater than 100 GB and at most 102400 GB (100 TB).


A acl block supports the following:


A access_policy block supports the following:

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

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

terraform import azurerm_storage_share.exampleShare https://account1.file.core.windows.net/share1