We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
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.Accountresource, or using theazure.storage.AccountNetworkRulesresource - 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.AccountNetworkRulescan be tied to anazure.storage.Account. Spurious changes will occur if more thanazure.storage.AccountNetworkRulesis tied to the sameazure.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:
- Default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - Bypasses List<string>
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - Ip
Rules 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.
- Private
Link List<AccountAccess Rules Network Rules Private Link Access Rule> - One or More
private_link_accessblock as defined below. - Resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- Storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- Storage
Account stringName - 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.
- Virtual
Network List<string>Subnet Ids - A list of virtual network subnet ids to to secure the storage account.
- Default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - Bypasses []string
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - Ip
Rules []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.
- Private
Link []AccountAccess Rules Network Rules Private Link Access Rule Args - One or More
private_link_accessblock as defined below. - Resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- Storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- Storage
Account stringName - 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.
- Virtual
Network []stringSubnet Ids - A list of virtual network subnet ids to to secure the storage account.
- default
Action String - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - bypasses List<String>
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - ip
Rules 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.
- private
Link List<AccountAccess Rules Network Rules Private Link Access Rule> - One or More
private_link_accessblock as defined below. - resource
Group StringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account StringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account StringName - 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.
- virtual
Network List<String>Subnet Ids - A list of virtual network subnet ids to to secure the storage account.
- default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - bypasses string[]
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - ip
Rules 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.
- private
Link AccountAccess Rules Network Rules Private Link Access Rule[] - One or More
private_link_accessblock as defined below. - resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account stringName - 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.
- virtual
Network string[]Subnet Ids - 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
DenyorAllow. - bypasses Sequence[str]
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - 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_ Sequence[Accountaccess_ rules Network Rules Private Link Access Rule Args] - One or More
private_link_accessblock as defined below. - resource_
group_ strname - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage_
account_ strid - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage_
account_ strname - 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.
- virtual_
network_ Sequence[str]subnet_ ids - A list of virtual network subnet ids to to secure the storage account.
- default
Action String - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - bypasses List<String>
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - ip
Rules 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.
- private
Link List<Property Map>Access Rules - One or More
private_link_accessblock as defined below. - resource
Group StringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account StringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account StringName - 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.
- virtual
Network List<String>Subnet Ids - 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) -> AccountNetworkRulesfunc 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.
- Bypasses List<string>
- Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of
Logging,Metrics,AzureServices, orNone. - Default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - Ip
Rules 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.
- Private
Link List<AccountAccess Rules Network Rules Private Link Access Rule> - One or More
private_link_accessblock as defined below. - Resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- Storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- Storage
Account stringName - 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.
- Virtual
Network List<string>Subnet Ids - 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, orNone. - Default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - Ip
Rules []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.
- Private
Link []AccountAccess Rules Network Rules Private Link Access Rule Args - One or More
private_link_accessblock as defined below. - Resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- Storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- Storage
Account stringName - 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.
- Virtual
Network []stringSubnet Ids - 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, orNone. - default
Action String - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - ip
Rules 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.
- private
Link List<AccountAccess Rules Network Rules Private Link Access Rule> - One or More
private_link_accessblock as defined below. - resource
Group StringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account StringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account StringName - 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.
- virtual
Network List<String>Subnet Ids - 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, orNone. - default
Action string - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - ip
Rules 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.
- private
Link AccountAccess Rules Network Rules Private Link Access Rule[] - One or More
private_link_accessblock as defined below. - resource
Group stringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account stringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account stringName - 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.
- virtual
Network string[]Subnet Ids - 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, orNone. - default_
action str - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - 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_ Sequence[Accountaccess_ rules Network Rules Private Link Access Rule Args] - One or More
private_link_accessblock as defined below. - resource_
group_ strname - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage_
account_ strid - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage_
account_ strname - 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.
- virtual_
network_ Sequence[str]subnet_ ids - 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, orNone. - default
Action String - Specifies the default action of allow or deny when no other rules match. Valid options are
DenyorAllow. - ip
Rules 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.
- private
Link List<Property Map>Access Rules - One or More
private_link_accessblock as defined below. - resource
Group StringName - The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
- storage
Account StringId - Specifies the ID of the storage account. Changing this forces a new resource to be created.
- storage
Account StringName - 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.
- virtual
Network List<String>Subnet Ids - A list of virtual network subnet ids to to secure the storage account.
Supporting Types
AccountNetworkRulesPrivateLinkAccessRule, AccountNetworkRulesPrivateLinkAccessRuleArgs
- Endpoint
Resource stringId - The resource id of the resource access rule to be granted access.
- Endpoint
Tenant stringId - The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
- Endpoint
Resource stringId - The resource id of the resource access rule to be granted access.
- Endpoint
Tenant stringId - The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
- endpoint
Resource StringId - The resource id of the resource access rule to be granted access.
- endpoint
Tenant StringId - The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
- endpoint
Resource stringId - The resource id of the resource access rule to be granted access.
- endpoint
Tenant stringId - The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
- endpoint_
resource_ strid - The resource id of the resource access rule to be granted access.
- endpoint_
tenant_ strid - The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id.
- endpoint
Resource StringId - The resource id of the resource access rule to be granted access.
- endpoint
Tenant StringId - 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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
