azurermStorageShareDirectory
Manages a Directory within an Azure Storage File Share.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "azuretest",
}
);
const azurermStorageAccountExample = new azurerm.storageAccount.StorageAccount(
this,
"example_1",
{
account_replication_type: "LRS",
account_tier: "Standard",
location: azurermResourceGroupExample.location,
name: "azureteststorage",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageAccountExample.overrideLogicalId("example");
const azurermStorageShareExample = new azurerm.storageShare.StorageShare(
this,
"example_2",
{
name: "sharename",
quota: 50,
storage_account_name: azurermStorageAccountExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageShareExample.overrideLogicalId("example");
const azurermStorageShareDirectoryExample =
new azurerm.storageShareDirectory.StorageShareDirectory(this, "example_3", {
name: "example",
share_name: azurermStorageShareExample.name,
storage_account_name: azurermStorageAccountExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStorageShareDirectoryExample.overrideLogicalId("example");
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. -
shareName
- (Required) The name of the File Share where this Directory should be created. Changing this forces a new resource to be created. -
storageAccountName
- (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 resourceId
, e.g.