ShareDirectory
Manages a Directory within an Azure Storage File Share.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleShare = new Azure.Storage.Share("exampleShare", new Azure.Storage.ShareArgs
{
StorageAccountName = exampleAccount.Name,
Quota = 50,
});
var exampleShareDirectory = new Azure.Storage.ShareDirectory("exampleShareDirectory", new Azure.Storage.ShareDirectoryArgs
{
ShareName = exampleShare.Name,
StorageAccountName = exampleAccount.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleShare, err := storage.NewShare(ctx, "exampleShare", &storage.ShareArgs{
StorageAccountName: exampleAccount.Name,
Quota: pulumi.Int(50),
})
if err != nil {
return err
}
_, err = storage.NewShareDirectory(ctx, "exampleShareDirectory", &storage.ShareDirectoryArgs{
ShareName: exampleShare.Name,
StorageAccountName: exampleAccount.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_share = azure.storage.Share("exampleShare",
storage_account_name=example_account.name,
quota=50)
example_share_directory = azure.storage.ShareDirectory("exampleShareDirectory",
share_name=example_share.name,
storage_account_name=example_account.name)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleShare = new azure.storage.Share("exampleShare", {
storageAccountName: exampleAccount.name,
quota: 50,
});
const exampleShareDirectory = new azure.storage.ShareDirectory("exampleShareDirectory", {
shareName: exampleShare.name,
storageAccountName: exampleAccount.name,
});Create a ShareDirectory Resource
new ShareDirectory(name: string, args: ShareDirectoryArgs, opts?: CustomResourceOptions);def ShareDirectory(resource_name, opts=None, metadata=None, name=None, share_name=None, storage_account_name=None, __props__=None);func NewShareDirectory(ctx *Context, name string, args ShareDirectoryArgs, opts ...ResourceOption) (*ShareDirectory, error)public ShareDirectory(string name, ShareDirectoryArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ShareDirectoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ShareDirectoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ShareDirectoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ShareDirectory Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ShareDirectory resource accepts the following input properties:
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- Storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- Metadata Dictionary<string, string>
A mapping of metadata to assign to this Directory.
- Name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- Storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- Metadata map[string]string
A mapping of metadata to assign to this Directory.
- Name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- metadata {[key: string]: string}
A mapping of metadata to assign to this Directory.
- name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- str
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- storage_
account_ strname The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- metadata Dict[str, str]
A mapping of metadata to assign to this Directory.
- name str
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ShareDirectory resource produces the following output properties:
Look up an Existing ShareDirectory Resource
Get an existing ShareDirectory resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ShareDirectoryState, opts?: CustomResourceOptions): ShareDirectorystatic get(resource_name, id, opts=None, metadata=None, name=None, share_name=None, storage_account_name=None, __props__=None);func GetShareDirectory(ctx *Context, name string, id IDInput, state *ShareDirectoryState, opts ...ResourceOption) (*ShareDirectory, error)public static ShareDirectory Get(string name, Input<string> id, ShareDirectoryState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Metadata Dictionary<string, string>
A mapping of metadata to assign to this Directory.
- Name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- Storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- Metadata map[string]string
A mapping of metadata to assign to this Directory.
- Name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- Storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- metadata {[key: string]: string}
A mapping of metadata to assign to this Directory.
- name string
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- string
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- storage
Account stringName The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
- metadata Dict[str, str]
A mapping of metadata to assign to this Directory.
- name str
The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
- str
The name of the File Share where this Directory should be created. Changing this forces a new resource to be created.
- storage_
account_ strname The name of the Storage Account within which the File Share is located. Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.