1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. AccountNetworkRules

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages network rules inside of a Azure Storage Account.

    NOTE: Network Rules can be defined either directly on the azure.storage.Account resource, or using the azure.storage.AccountNetworkRules resource - but the two cannot be used together. Spurious changes will occur if both are used against the same Storage Account.

    NOTE: Only one azure.storage.AccountNetworkRules can be tied to an azure.storage.Account. Spurious changes will occur if more than azure.storage.AccountNetworkRules is tied to the same azure.storage.Account.

    NOTE: Deleting this resource updates the storage account back to the default values it had when the storage account was created.

    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 exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
            {
                AddressSpaces = 
                {
                    "10.0.0.0/16",
                },
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
            });
            var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                VirtualNetworkName = exampleVirtualNetwork.Name,
                AddressPrefixes = 
                {
                    "10.0.2.0/24",
                },
                ServiceEndpoints = 
                {
                    "Microsoft.Storage",
                },
            });
            var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                AccountTier = "Standard",
                AccountReplicationType = "GRS",
                Tags = 
                {
                    { "environment", "staging" },
                },
            });
            var test = new Azure.Storage.AccountNetworkRules("test", new Azure.Storage.AccountNetworkRulesArgs
            {
                StorageAccountId = azurerm_storage_account.Test.Id,
                DefaultAction = "Allow",
                IpRules = 
                {
                    "127.0.0.1",
                },
                VirtualNetworkSubnetIds = 
                {
                    azurerm_subnet.Test.Id,
                },
                Bypasses = 
                {
                    "Metrics",
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/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
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
    			ResourceGroupName:  exampleResourceGroup.Name,
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.2.0/24"),
    			},
    			ServiceEndpoints: pulumi.StringArray{
    				pulumi.String("Microsoft.Storage"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
    			ResourceGroupName:      exampleResourceGroup.Name,
    			Location:               exampleResourceGroup.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("GRS"),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("staging"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = storage.NewAccountNetworkRules(ctx, "test", &storage.AccountNetworkRulesArgs{
    			StorageAccountId: pulumi.Any(azurerm_storage_account.Test.Id),
    			DefaultAction:    pulumi.String("Allow"),
    			IpRules: pulumi.StringArray{
    				pulumi.String("127.0.0.1"),
    			},
    			VirtualNetworkSubnetIds: pulumi.StringArray{
    				pulumi.Any(azurerm_subnet.Test.Id),
    			},
    			Bypasses: pulumi.StringArray{
    				pulumi.String("Metrics"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
        addressSpaces: ["10.0.0.0/16"],
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
    });
    const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
        resourceGroupName: exampleResourceGroup.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
        serviceEndpoints: ["Microsoft.Storage"],
    });
    const exampleAccount = new azure.storage.Account("exampleAccount", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        accountTier: "Standard",
        accountReplicationType: "GRS",
        tags: {
            environment: "staging",
        },
    });
    const test = new azure.storage.AccountNetworkRules("test", {
        storageAccountId: azurerm_storage_account.test.id,
        defaultAction: "Allow",
        ipRules: ["127.0.0.1"],
        virtualNetworkSubnetIds: [azurerm_subnet.test.id],
        bypasses: ["Metrics"],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
        address_spaces=["10.0.0.0/16"],
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name)
    example_subnet = azure.network.Subnet("exampleSubnet",
        resource_group_name=example_resource_group.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"],
        service_endpoints=["Microsoft.Storage"])
    example_account = azure.storage.Account("exampleAccount",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        account_tier="Standard",
        account_replication_type="GRS",
        tags={
            "environment": "staging",
        })
    test = azure.storage.AccountNetworkRules("test",
        storage_account_id=azurerm_storage_account["test"]["id"],
        default_action="Allow",
        ip_rules=["127.0.0.1"],
        virtual_network_subnet_ids=[azurerm_subnet["test"]["id"]],
        bypasses=["Metrics"])
    

    Example coming soon!

    Create AccountNetworkRules Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AccountNetworkRules(name: string, args: AccountNetworkRulesArgs, opts?: CustomResourceOptions);
    @overload
    def AccountNetworkRules(resource_name: str,
                            args: AccountNetworkRulesInitArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccountNetworkRules(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            default_action: Optional[str] = None,
                            bypasses: Optional[Sequence[str]] = None,
                            ip_rules: Optional[Sequence[str]] = None,
                            private_link_access_rules: Optional[Sequence[AccountNetworkRulesPrivateLinkAccessRuleArgs]] = None,
                            resource_group_name: Optional[str] = None,
                            storage_account_id: Optional[str] = None,
                            storage_account_name: Optional[str] = None,
                            virtual_network_subnet_ids: Optional[Sequence[str]] = None)
    func NewAccountNetworkRules(ctx *Context, name string, args AccountNetworkRulesArgs, opts ...ResourceOption) (*AccountNetworkRules, error)
    public AccountNetworkRules(string name, AccountNetworkRulesArgs args, CustomResourceOptions? opts = null)
    public AccountNetworkRules(String name, AccountNetworkRulesArgs args)
    public AccountNetworkRules(String name, AccountNetworkRulesArgs args, CustomResourceOptions options)
    
    type: azure:storage:AccountNetworkRules
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AccountNetworkRulesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AccountNetworkRulesInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AccountNetworkRulesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountNetworkRulesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountNetworkRulesArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var accountNetworkRulesResource = new Azure.Storage.AccountNetworkRules("accountNetworkRulesResource", new()
    {
        DefaultAction = "string",
        Bypasses = new[]
        {
            "string",
        },
        IpRules = new[]
        {
            "string",
        },
        PrivateLinkAccessRules = new[]
        {
            new Azure.Storage.Inputs.AccountNetworkRulesPrivateLinkAccessRuleArgs
            {
                EndpointResourceId = "string",
                EndpointTenantId = "string",
            },
        },
        StorageAccountId = "string",
        VirtualNetworkSubnetIds = new[]
        {
            "string",
        },
    });
    
    example, err := storage.NewAccountNetworkRules(ctx, "accountNetworkRulesResource", &storage.AccountNetworkRulesArgs{
    	DefaultAction: pulumi.String("string"),
    	Bypasses: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IpRules: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PrivateLinkAccessRules: storage.AccountNetworkRulesPrivateLinkAccessRuleArray{
    		&storage.AccountNetworkRulesPrivateLinkAccessRuleArgs{
    			EndpointResourceId: pulumi.String("string"),
    			EndpointTenantId:   pulumi.String("string"),
    		},
    	},
    	StorageAccountId: pulumi.String("string"),
    	VirtualNetworkSubnetIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var accountNetworkRulesResource = new AccountNetworkRules("accountNetworkRulesResource", AccountNetworkRulesArgs.builder()
        .defaultAction("string")
        .bypasses("string")
        .ipRules("string")
        .privateLinkAccessRules(AccountNetworkRulesPrivateLinkAccessRuleArgs.builder()
            .endpointResourceId("string")
            .endpointTenantId("string")
            .build())
        .storageAccountId("string")
        .virtualNetworkSubnetIds("string")
        .build());
    
    account_network_rules_resource = azure.storage.AccountNetworkRules("accountNetworkRulesResource",
        default_action="string",
        bypasses=["string"],
        ip_rules=["string"],
        private_link_access_rules=[{
            "endpoint_resource_id": "string",
            "endpoint_tenant_id": "string",
        }],
        storage_account_id="string",
        virtual_network_subnet_ids=["string"])
    
    const accountNetworkRulesResource = new azure.storage.AccountNetworkRules("accountNetworkRulesResource", {
        defaultAction: "string",
        bypasses: ["string"],
        ipRules: ["string"],
        privateLinkAccessRules: [{
            endpointResourceId: "string",
            endpointTenantId: "string",
        }],
        storageAccountId: "string",
        virtualNetworkSubnetIds: ["string"],
    });
    
    type: azure:storage:AccountNetworkRules
    properties:
        bypasses:
            - string
        defaultAction: string
        ipRules:
            - string
        privateLinkAccessRules:
            - endpointResourceId: string
              endpointTenantId: string
        storageAccountId: string
        virtualNetworkSubnetIds:
            - string
    

    AccountNetworkRules Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AccountNetworkRules resource accepts the following input properties:

    DefaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    Bypasses List<string>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    IpRules List<string>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    PrivateLinkAccessRules List<AccountNetworkRulesPrivateLinkAccessRule>
    One or More private_link_access block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    StorageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    StorageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    VirtualNetworkSubnetIds List<string>
    A list of virtual network subnet ids to to secure the storage account.
    DefaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    Bypasses []string
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    IpRules []string
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    PrivateLinkAccessRules []AccountNetworkRulesPrivateLinkAccessRuleArgs
    One or More private_link_access block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    StorageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    StorageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    VirtualNetworkSubnetIds []string
    A list of virtual network subnet ids to to secure the storage account.
    defaultAction String
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    bypasses List<String>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    ipRules List<String>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules List<AccountNetworkRulesPrivateLinkAccessRule>
    One or More private_link_access block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId String
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName String
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds List<String>
    A list of virtual network subnet ids to to secure the storage account.
    defaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    bypasses string[]
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    ipRules string[]
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules AccountNetworkRulesPrivateLinkAccessRule[]
    One or More private_link_access block as defined below.
    resourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds string[]
    A list of virtual network subnet ids to to secure the storage account.
    default_action str
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    bypasses Sequence[str]
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    ip_rules Sequence[str]
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    private_link_access_rules Sequence[AccountNetworkRulesPrivateLinkAccessRuleArgs]
    One or More private_link_access block as defined below.
    resource_group_name str
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storage_account_id str
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storage_account_name str
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtual_network_subnet_ids Sequence[str]
    A list of virtual network subnet ids to to secure the storage account.
    defaultAction String
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    bypasses List<String>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    ipRules List<String>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules List<Property Map>
    One or More private_link_access block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId String
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName String
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds List<String>
    A list of virtual network subnet ids to to secure the storage account.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AccountNetworkRules resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AccountNetworkRules Resource

    Get an existing AccountNetworkRules 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?: AccountNetworkRulesState, opts?: CustomResourceOptions): AccountNetworkRules
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bypasses: Optional[Sequence[str]] = None,
            default_action: Optional[str] = None,
            ip_rules: Optional[Sequence[str]] = None,
            private_link_access_rules: Optional[Sequence[AccountNetworkRulesPrivateLinkAccessRuleArgs]] = None,
            resource_group_name: Optional[str] = None,
            storage_account_id: Optional[str] = None,
            storage_account_name: Optional[str] = None,
            virtual_network_subnet_ids: Optional[Sequence[str]] = None) -> AccountNetworkRules
    func GetAccountNetworkRules(ctx *Context, name string, id IDInput, state *AccountNetworkRulesState, opts ...ResourceOption) (*AccountNetworkRules, error)
    public static AccountNetworkRules Get(string name, Input<string> id, AccountNetworkRulesState? state, CustomResourceOptions? opts = null)
    public static AccountNetworkRules get(String name, Output<String> id, AccountNetworkRulesState state, CustomResourceOptions options)
    resources:  _:    type: azure:storage:AccountNetworkRules    get:      id: ${id}
    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.
    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:
    Bypasses List<string>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    DefaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    IpRules List<string>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    PrivateLinkAccessRules List<AccountNetworkRulesPrivateLinkAccessRule>
    One or More private_link_access block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    StorageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    StorageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    VirtualNetworkSubnetIds List<string>
    A list of virtual network subnet ids to to secure the storage account.
    Bypasses []string
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    DefaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    IpRules []string
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    PrivateLinkAccessRules []AccountNetworkRulesPrivateLinkAccessRuleArgs
    One or More private_link_access block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    StorageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    StorageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    VirtualNetworkSubnetIds []string
    A list of virtual network subnet ids to to secure the storage account.
    bypasses List<String>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    defaultAction String
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    ipRules List<String>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules List<AccountNetworkRulesPrivateLinkAccessRule>
    One or More private_link_access block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId String
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName String
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds List<String>
    A list of virtual network subnet ids to to secure the storage account.
    bypasses string[]
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    defaultAction string
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    ipRules string[]
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules AccountNetworkRulesPrivateLinkAccessRule[]
    One or More private_link_access block as defined below.
    resourceGroupName string
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId string
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName string
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds string[]
    A list of virtual network subnet ids to to secure the storage account.
    bypasses Sequence[str]
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    default_action str
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    ip_rules Sequence[str]
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    private_link_access_rules Sequence[AccountNetworkRulesPrivateLinkAccessRuleArgs]
    One or More private_link_access block as defined below.
    resource_group_name str
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storage_account_id str
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storage_account_name str
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtual_network_subnet_ids Sequence[str]
    A list of virtual network subnet ids to to secure the storage account.
    bypasses List<String>
    Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None.
    defaultAction String
    Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow.
    ipRules List<String>
    List of public IP or IP ranges in CIDR Format. Only IPV4 addresses are allowed. Private IP address ranges (as defined in RFC 1918) are not allowed.
    privateLinkAccessRules List<Property Map>
    One or More private_link_access block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.

    Deprecated: Deprecated in favour of storage_account_id

    storageAccountId String
    Specifies the ID of the storage account. Changing this forces a new resource to be created.
    storageAccountName String
    Specifies the name of the storage account. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.

    Deprecated: Deprecated in favour of storage_account_id

    virtualNetworkSubnetIds List<String>
    A list of virtual network subnet ids to to secure the storage account.

    Supporting Types

    AccountNetworkRulesPrivateLinkAccessRule, AccountNetworkRulesPrivateLinkAccessRuleArgs

    EndpointResourceId string
    The resource id of the resource access rule to be granted access.
    EndpointTenantId string
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
    EndpointResourceId string
    The resource id of the resource access rule to be granted access.
    EndpointTenantId string
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
    endpointResourceId String
    The resource id of the resource access rule to be granted access.
    endpointTenantId String
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
    endpointResourceId string
    The resource id of the resource access rule to be granted access.
    endpointTenantId string
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
    endpoint_resource_id str
    The resource id of the resource access rule to be granted access.
    endpoint_tenant_id str
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
    endpointResourceId String
    The resource id of the resource access rule to be granted access.
    endpointTenantId String
    The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.

    Import

    Storage Account Network Rules can be imported using the resource id, e.g.

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.