Share Args
Manages a File Share within Azure Storage.
Note: The storage share supports two storage tiers: premium and standard. Standard file shares are created in general purpose (GPv1 or GPv2) storage accounts and premium file shares are created in FileStorage storage accounts. For further information, refer to the section "What storage tiers are supported in Azure Files?" of documentation.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.storage.inputs.ShareAclArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("azuretest")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("azureteststorage")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.name("sharename")
.storageAccountName(exampleAccount.name())
.quota(50)
.acls(ShareAclArgs.builder()
.id("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI")
.accessPolicies(ShareAclAccessPolicyArgs.builder()
.permissions("rwdl")
.start("2019-07-02T09:38:21.0000000Z")
.expiry("2019-07-02T10:38:21.0000000Z")
.build())
.build())
.build());
}
}Import
Storage Shares can be imported using the resource id, e.g.
$ pulumi import azure:storage/share:Share exampleShare https://account1.file.core.windows.net/share1Constructors
Functions
Properties
The protocol used for the share. Possible values are SMB and NFS. The SMB indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The NFS indicates the share can be accessed by NFSv4.1. Defaults to SMB. Changing this forces a new resource to be created. ~>NOTE: The FileStorage account_kind of the azure.storage.Account is required for the NFS protocol.
The maximum size of the share, in gigabytes. ~>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 azure.storage.Account. ~>NOTE: For Premium FileStorage storage accounts, this must be greater than 100 GB and at most 102400 GB (100 TB).