AccountArgs

data class AccountArgs(val accessTier: Output<String>? = null, val accountKind: Output<String>? = null, val accountReplicationType: Output<String>? = null, val accountTier: Output<String>? = null, val allowNestedItemsToBePublic: Output<Boolean>? = null, val allowedCopyScope: Output<String>? = null, val azureFilesAuthentication: Output<AccountAzureFilesAuthenticationArgs>? = null, val blobProperties: Output<AccountBlobPropertiesArgs>? = null, val crossTenantReplicationEnabled: Output<Boolean>? = null, val customDomain: Output<AccountCustomDomainArgs>? = null, val customerManagedKey: Output<AccountCustomerManagedKeyArgs>? = null, val defaultToOauthAuthentication: Output<Boolean>? = null, val dnsEndpointType: Output<String>? = null, val edgeZone: Output<String>? = null, val httpsTrafficOnlyEnabled: Output<Boolean>? = null, val identity: Output<AccountIdentityArgs>? = null, val immutabilityPolicy: Output<AccountImmutabilityPolicyArgs>? = null, val infrastructureEncryptionEnabled: Output<Boolean>? = null, val isHnsEnabled: Output<Boolean>? = null, val largeFileShareEnabled: Output<Boolean>? = null, val localUserEnabled: Output<Boolean>? = null, val location: Output<String>? = null, val minTlsVersion: Output<String>? = null, val name: Output<String>? = null, val networkRules: Output<AccountNetworkRulesArgs>? = null, val nfsv3Enabled: Output<Boolean>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val queueEncryptionKeyType: Output<String>? = null, val queueProperties: Output<AccountQueuePropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val routing: Output<AccountRoutingArgs>? = null, val sasPolicy: Output<AccountSasPolicyArgs>? = null, val sftpEnabled: Output<Boolean>? = null, val shareProperties: Output<AccountSharePropertiesArgs>? = null, val sharedAccessKeyEnabled: Output<Boolean>? = null, val staticWebsite: Output<AccountStaticWebsiteArgs>? = null, val tableEncryptionKeyType: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AccountArgs>

Manages an Azure Storage Account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "storageaccountname",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "GRS",
tags: {
environment: "staging",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_account = azure.storage.Account("example",
name="storageaccountname",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="GRS",
tags={
"environment": "staging",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "storageaccountname",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "GRS",
Tags =
{
{ "environment", "staging" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("storageaccountname"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
Tags: pulumi.StringMap{
"environment": pulumi.String("staging"),
},
})
if err != nil {
return err
}
return nil
})
}
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 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("example-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("storageaccountname")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("GRS")
.tags(Map.of("environment", "staging"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: storageaccountname
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: GRS
tags:
environment: staging

With Network Rules

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "virtnetname",
addressSpaces: ["10&#46;0&#46;0&#46;0/16"],
location: example.location,
resourceGroupName: example.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "subnetname",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10&#46;0&#46;2&#46;0/24"],
serviceEndpoints: [
"Microsoft.Sql",
"Microsoft.Storage",
],
});
const exampleAccount = new azure.storage.Account("example", {
name: "storageaccountname",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
networkRules: {
defaultAction: "Deny",
ipRules: ["100&#46;0&#46;0&#46;1"],
virtualNetworkSubnetIds: [exampleSubnet&#46;id],
},
tags: {
environment: "staging",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="virtnetname",
address_spaces=["10&#46;0&#46;0&#46;0/16"],
location=example.location,
resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
name="subnetname",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10&#46;0&#46;2&#46;0/24"],
service_endpoints=[
"Microsoft.Sql",
"Microsoft.Storage",
])
example_account = azure.storage.Account("example",
name="storageaccountname",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS",
network_rules={
"default_action": "Deny",
"ip_rules": ["100&#46;0&#46;0&#46;1"],
"virtual_network_subnet_ids": [example_subnet&#46;id],
},
tags={
"environment": "staging",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "virtnetname",
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "subnetname",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
ServiceEndpoints = new[]
{
"Microsoft.Sql",
"Microsoft.Storage",
},
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "storageaccountname",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
NetworkRules = new Azure.Storage.Inputs.AccountNetworkRulesArgs
{
DefaultAction = "Deny",
IpRules = new[]
{
"100.0.0.1",
},
VirtualNetworkSubnetIds = new[]
{
exampleSubnet.Id,
},
},
Tags =
{
{ "environment", "staging" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("virtnetname"),
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("subnetname"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
ServiceEndpoints: pulumi.StringArray{
pulumi.String("Microsoft.Sql"),
pulumi.String("Microsoft.Storage"),
},
})
if err != nil {
return err
}
_, err = storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("storageaccountname"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
NetworkRules: &storage.AccountNetworkRulesTypeArgs{
DefaultAction: pulumi.String("Deny"),
IpRules: pulumi.StringArray{
pulumi.String("100.0.0.1"),
},
VirtualNetworkSubnetIds: pulumi.StringArray{
exampleSubnet.ID(),
},
},
Tags: pulumi.StringMap{
"environment": pulumi.String("staging"),
},
})
if err != nil {
return err
}
return nil
})
}
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.inputs.AccountNetworkRulesArgs;
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("example-resources")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("virtnetname")
.addressSpaces("10.0.0.0/16")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("subnetname")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.serviceEndpoints(
"Microsoft.Sql",
"Microsoft.Storage")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("storageaccountname")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.networkRules(AccountNetworkRulesArgs.builder()
.defaultAction("Deny")
.ipRules("100.0.0.1")
.virtualNetworkSubnetIds(exampleSubnet.id())
.build())
.tags(Map.of("environment", "staging"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: virtnetname
addressSpaces:
- 10.0.0.0/16
location: ${example.location}
resourceGroupName: ${example.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: subnetname
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
serviceEndpoints:
- Microsoft.Sql
- Microsoft.Storage
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: storageaccountname
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
networkRules:
defaultAction: Deny
ipRules:
- 100.0.0.1
virtualNetworkSubnetIds:
- ${exampleSubnet.id}
tags:
environment: staging

Import

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

$ pulumi import azure:storage/account:Account storageAcc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount

Constructors

Link copied to clipboard
constructor(accessTier: Output<String>? = null, accountKind: Output<String>? = null, accountReplicationType: Output<String>? = null, accountTier: Output<String>? = null, allowNestedItemsToBePublic: Output<Boolean>? = null, allowedCopyScope: Output<String>? = null, azureFilesAuthentication: Output<AccountAzureFilesAuthenticationArgs>? = null, blobProperties: Output<AccountBlobPropertiesArgs>? = null, crossTenantReplicationEnabled: Output<Boolean>? = null, customDomain: Output<AccountCustomDomainArgs>? = null, customerManagedKey: Output<AccountCustomerManagedKeyArgs>? = null, defaultToOauthAuthentication: Output<Boolean>? = null, dnsEndpointType: Output<String>? = null, edgeZone: Output<String>? = null, httpsTrafficOnlyEnabled: Output<Boolean>? = null, identity: Output<AccountIdentityArgs>? = null, immutabilityPolicy: Output<AccountImmutabilityPolicyArgs>? = null, infrastructureEncryptionEnabled: Output<Boolean>? = null, isHnsEnabled: Output<Boolean>? = null, largeFileShareEnabled: Output<Boolean>? = null, localUserEnabled: Output<Boolean>? = null, location: Output<String>? = null, minTlsVersion: Output<String>? = null, name: Output<String>? = null, networkRules: Output<AccountNetworkRulesArgs>? = null, nfsv3Enabled: Output<Boolean>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, queueEncryptionKeyType: Output<String>? = null, queueProperties: Output<AccountQueuePropertiesArgs>? = null, resourceGroupName: Output<String>? = null, routing: Output<AccountRoutingArgs>? = null, sasPolicy: Output<AccountSasPolicyArgs>? = null, sftpEnabled: Output<Boolean>? = null, shareProperties: Output<AccountSharePropertiesArgs>? = null, sharedAccessKeyEnabled: Output<Boolean>? = null, staticWebsite: Output<AccountStaticWebsiteArgs>? = null, tableEncryptionKeyType: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val accessTier: Output<String>? = null

Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot, Cool, Cold and Premium. Defaults to Hot.

Link copied to clipboard
val accountKind: Output<String>? = null

Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2.

Link copied to clipboard
val accountReplicationType: Output<String>? = null

Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. Changing this forces a new resource to be created when types LRS, GRS and RAGRS are changed to ZRS, GZRS or RAGZRS and vice versa.

Link copied to clipboard
val accountTier: Output<String>? = null

Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created.

Link copied to clipboard
val allowedCopyScope: Output<String>? = null

Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink.

Link copied to clipboard
val allowNestedItemsToBePublic: Output<Boolean>? = null

Allow or disallow nested items within this Account to opt into being public. Defaults to true.

Link copied to clipboard

A azure_files_authentication block as defined below.

Link copied to clipboard

A blob_properties block as defined below.

Link copied to clipboard

Should cross Tenant replication be enabled? Defaults to false.

Link copied to clipboard

A custom_domain block as documented below.

Link copied to clipboard

A customer_managed_key block as documented below.

Link copied to clipboard

Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false

Link copied to clipboard
val dnsEndpointType: Output<String>? = null

Specifies which DNS endpoint type to use. Possible values are Standard and AzureDnsZone. Defaults to Standard. Changing this forces a new resource to be created.

Link copied to clipboard
val edgeZone: Output<String>? = null

Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created.

Link copied to clipboard
val httpsTrafficOnlyEnabled: Output<Boolean>? = null

Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true.

Link copied to clipboard
val identity: Output<AccountIdentityArgs>? = null

An identity block as defined below.

Link copied to clipboard

An immutability_policy block as defined below. Changing this forces a new resource to be created.

Link copied to clipboard

Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false.

Link copied to clipboard
val isHnsEnabled: Output<Boolean>? = null

Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created.

Link copied to clipboard
val largeFileShareEnabled: Output<Boolean>? = null

Are Large File Shares Enabled? Defaults to false.

Link copied to clipboard
val localUserEnabled: Output<Boolean>? = null

Is Local User Enabled? Defaults to true.

Link copied to clipboard
val location: Output<String>? = null

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val minTlsVersion: Output<String>? = null

The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the storage account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

Link copied to clipboard

A network_rules block as documented below.

Link copied to clipboard
val nfsv3Enabled: Output<Boolean>? = null

Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false.

Link copied to clipboard
val publicNetworkAccessEnabled: Output<Boolean>? = null

Whether the public network access is enabled? Defaults to true.

Link copied to clipboard
val queueEncryptionKeyType: Output<String>? = null

The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service.

Link copied to clipboard

A queue_properties block as defined below.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

Link copied to clipboard
val routing: Output<AccountRoutingArgs>? = null

A routing block as defined below.

Link copied to clipboard
val sasPolicy: Output<AccountSasPolicyArgs>? = null

A sas_policy block as defined below.

Link copied to clipboard
val sftpEnabled: Output<Boolean>? = null

Boolean, enable SFTP for the storage account

Link copied to clipboard
val sharedAccessKeyEnabled: Output<Boolean>? = null
Link copied to clipboard

A share_properties block as defined below.

Link copied to clipboard

A static_website block as defined below.

Link copied to clipboard
val tableEncryptionKeyType: Output<String>? = null

The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Functions

Link copied to clipboard
open override fun toJava(): AccountArgs