» azurerm_storage_share_directory

Manages a Directory within an Azure Storage File Share.

» 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
}

resource "azurerm_storage_share_directory" "example" {
  name                 = "example"
  share_name           = azurerm_storage_share.example.name
  storage_account_name = azurerm_storage_account.example.name
}

» Argument Reference

The following arguments are supported:

  • name - (Required) The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.

  • share_name - (Required) The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.

  • storage_account_name - (Required) The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.

  • metadata - (Optional) A mapping of metadata to assign to this Directory.

» Attributes Reference

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

  • id - The ID of the Directory within the File Share.

» Timeouts

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

  • create - (Defaults to 30 minutes) Used when creating the Storage Share Directory.
  • update - (Defaults to 30 minutes) Used when updating the Storage Share Directory.
  • read - (Defaults to 5 minutes) Used when retrieving the Storage Share Directory.
  • delete - (Defaults to 30 minutes) Used when deleting the Storage Share Directory.

» Import

Directories within an Azure Storage File Share can be imported using the resource id, e.g.

terraform import azurerm_storage_share_directory.examplehttps://tomdevsa20.file.core.windows.net/share1/directory1