pulumi_wasm_providers_azure_mini::storage

Module account_network_rules

source
Expand description

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

resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleVirtualNetwork:
    type: azure:network:VirtualNetwork
    name: example
    properties:
      name: example-vnet
      addressSpaces:
        - 10.0.0.0/16
      location: ${example.location}
      resourceGroupName: ${example.name}
  exampleSubnet:
    type: azure:network:Subnet
    name: example
    properties:
      name: example-subnet
      resourceGroupName: ${example.name}
      virtualNetworkName: ${exampleVirtualNetwork.name}
      addressPrefixes:
        - 10.0.2.0/24
      serviceEndpoints:
        - Microsoft.Storage
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: storageaccountname
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountReplicationType: GRS
      tags:
        environment: staging
  exampleAccountNetworkRules:
    type: azure:storage:AccountNetworkRules
    name: example
    properties:
      storageAccountId: ${exampleAccount.id}
      defaultAction: Allow
      ipRules:
        - 127.0.0.1
      virtualNetworkSubnetIds:
        - ${exampleSubnet.id}
      bypasses:
        - Metrics

§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

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments