1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. Subnet

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.network.Subnet

Explore with Pulumi AI

Manages a subnet. Subnets represent network segments within the IP space defined by the virtual network.

NOTE on Virtual Networks and Subnet’s: This provider currently provides both a standalone Subnet resource, and allows for Subnets to be defined in-line within the Virtual Network resource. At this time you cannot use a Virtual Network with in-line Subnets in conjunction with any Subnet resources. Doing so will cause a conflict of Subnet configurations and will overwrite Subnets.

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 exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
    name: "example-vnet",
    addressSpaces: ["10.0.0.0/16"],
    location: example.location,
    resourceGroupName: example.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
    name: "example-subnet",
    resourceGroupName: example.name,
    virtualNetworkName: exampleVirtualNetwork.name,
    addressPrefixes: ["10.0.1.0/24"],
    delegations: [{
        name: "delegation",
        serviceDelegation: {
            name: "Microsoft.ContainerInstance/containerGroups",
            actions: [
                "Microsoft.Network/virtualNetworks/subnets/join/action",
                "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
            ],
        },
    }],
});
Copy
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="example-vnet",
    address_spaces=["10.0.0.0/16"],
    location=example.location,
    resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
    name="example-subnet",
    resource_group_name=example.name,
    virtual_network_name=example_virtual_network.name,
    address_prefixes=["10.0.1.0/24"],
    delegations=[{
        "name": "delegation",
        "service_delegation": {
            "name": "Microsoft.ContainerInstance/containerGroups",
            "actions": [
                "Microsoft.Network/virtualNetworks/subnets/join/action",
                "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
            ],
        },
    }])
Copy
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/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("example-vnet"),
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.0.0.0/16"),
			},
			Location:          example.Location,
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		_, err = network.NewSubnet(ctx, "example", &network.SubnetArgs{
			Name:               pulumi.String("example-subnet"),
			ResourceGroupName:  example.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.0.1.0/24"),
			},
			Delegations: network.SubnetDelegationArray{
				&network.SubnetDelegationArgs{
					Name: pulumi.String("delegation"),
					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
						Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"),
						Actions: pulumi.StringArray{
							pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
							pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "example-vnet",
        AddressSpaces = new[]
        {
            "10.0.0.0/16",
        },
        Location = example.Location,
        ResourceGroupName = example.Name,
    });

    var exampleSubnet = new Azure.Network.Subnet("example", new()
    {
        Name = "example-subnet",
        ResourceGroupName = example.Name,
        VirtualNetworkName = exampleVirtualNetwork.Name,
        AddressPrefixes = new[]
        {
            "10.0.1.0/24",
        },
        Delegations = new[]
        {
            new Azure.Network.Inputs.SubnetDelegationArgs
            {
                Name = "delegation",
                ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
                {
                    Name = "Microsoft.ContainerInstance/containerGroups",
                    Actions = new[]
                    {
                        "Microsoft.Network/virtualNetworks/subnets/join/action",
                        "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
                    },
                },
            },
        },
    });

});
Copy
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.network.inputs.SubnetDelegationArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
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("example-vnet")
            .addressSpaces("10.0.0.0/16")
            .location(example.location())
            .resourceGroupName(example.name())
            .build());

        var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
            .name("example-subnet")
            .resourceGroupName(example.name())
            .virtualNetworkName(exampleVirtualNetwork.name())
            .addressPrefixes("10.0.1.0/24")
            .delegations(SubnetDelegationArgs.builder()
                .name("delegation")
                .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
                    .name("Microsoft.ContainerInstance/containerGroups")
                    .actions(                    
                        "Microsoft.Network/virtualNetworks/subnets/join/action",
                        "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action")
                    .build())
                .build())
            .build());

    }
}
Copy
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.1.0/24
      delegations:
        - name: delegation
          serviceDelegation:
            name: Microsoft.ContainerInstance/containerGroups
            actions:
              - Microsoft.Network/virtualNetworks/subnets/join/action
              - Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action
Copy

Create Subnet Resource

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

Constructor syntax

new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
@overload
def Subnet(resource_name: str,
           args: SubnetArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Subnet(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           address_prefixes: Optional[Sequence[str]] = None,
           resource_group_name: Optional[str] = None,
           virtual_network_name: Optional[str] = None,
           default_outbound_access_enabled: Optional[bool] = None,
           delegations: Optional[Sequence[SubnetDelegationArgs]] = None,
           name: Optional[str] = None,
           private_endpoint_network_policies: Optional[str] = None,
           private_link_service_network_policies_enabled: Optional[bool] = None,
           service_endpoint_policy_ids: Optional[Sequence[str]] = None,
           service_endpoints: Optional[Sequence[str]] = None)
func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
public Subnet(String name, SubnetArgs args)
public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
type: azure:network:Subnet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SubnetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SubnetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SubnetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SubnetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SubnetArgs
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 subnetResource = new Azure.Network.Subnet("subnetResource", new()
{
    AddressPrefixes = new[]
    {
        "string",
    },
    ResourceGroupName = "string",
    VirtualNetworkName = "string",
    DefaultOutboundAccessEnabled = false,
    Delegations = new[]
    {
        new Azure.Network.Inputs.SubnetDelegationArgs
        {
            Name = "string",
            ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
            {
                Name = "string",
                Actions = new[]
                {
                    "string",
                },
            },
        },
    },
    Name = "string",
    PrivateEndpointNetworkPolicies = "string",
    PrivateLinkServiceNetworkPoliciesEnabled = false,
    ServiceEndpointPolicyIds = new[]
    {
        "string",
    },
    ServiceEndpoints = new[]
    {
        "string",
    },
});
Copy
example, err := network.NewSubnet(ctx, "subnetResource", &network.SubnetArgs{
	AddressPrefixes: pulumi.StringArray{
		pulumi.String("string"),
	},
	ResourceGroupName:            pulumi.String("string"),
	VirtualNetworkName:           pulumi.String("string"),
	DefaultOutboundAccessEnabled: pulumi.Bool(false),
	Delegations: network.SubnetDelegationArray{
		&network.SubnetDelegationArgs{
			Name: pulumi.String("string"),
			ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
				Name: pulumi.String("string"),
				Actions: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	Name:                                     pulumi.String("string"),
	PrivateEndpointNetworkPolicies:           pulumi.String("string"),
	PrivateLinkServiceNetworkPoliciesEnabled: pulumi.Bool(false),
	ServiceEndpointPolicyIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ServiceEndpoints: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
    .addressPrefixes("string")
    .resourceGroupName("string")
    .virtualNetworkName("string")
    .defaultOutboundAccessEnabled(false)
    .delegations(SubnetDelegationArgs.builder()
        .name("string")
        .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
            .name("string")
            .actions("string")
            .build())
        .build())
    .name("string")
    .privateEndpointNetworkPolicies("string")
    .privateLinkServiceNetworkPoliciesEnabled(false)
    .serviceEndpointPolicyIds("string")
    .serviceEndpoints("string")
    .build());
Copy
subnet_resource = azure.network.Subnet("subnetResource",
    address_prefixes=["string"],
    resource_group_name="string",
    virtual_network_name="string",
    default_outbound_access_enabled=False,
    delegations=[{
        "name": "string",
        "service_delegation": {
            "name": "string",
            "actions": ["string"],
        },
    }],
    name="string",
    private_endpoint_network_policies="string",
    private_link_service_network_policies_enabled=False,
    service_endpoint_policy_ids=["string"],
    service_endpoints=["string"])
Copy
const subnetResource = new azure.network.Subnet("subnetResource", {
    addressPrefixes: ["string"],
    resourceGroupName: "string",
    virtualNetworkName: "string",
    defaultOutboundAccessEnabled: false,
    delegations: [{
        name: "string",
        serviceDelegation: {
            name: "string",
            actions: ["string"],
        },
    }],
    name: "string",
    privateEndpointNetworkPolicies: "string",
    privateLinkServiceNetworkPoliciesEnabled: false,
    serviceEndpointPolicyIds: ["string"],
    serviceEndpoints: ["string"],
});
Copy
type: azure:network:Subnet
properties:
    addressPrefixes:
        - string
    defaultOutboundAccessEnabled: false
    delegations:
        - name: string
          serviceDelegation:
            actions:
                - string
            name: string
    name: string
    privateEndpointNetworkPolicies: string
    privateLinkServiceNetworkPoliciesEnabled: false
    resourceGroupName: string
    serviceEndpointPolicyIds:
        - string
    serviceEndpoints:
        - string
    virtualNetworkName: string
Copy

Subnet 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 Subnet resource accepts the following input properties:

AddressPrefixes This property is required. List<string>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
VirtualNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
DefaultOutboundAccessEnabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
Delegations List<SubnetDelegation>
One or more delegation blocks as defined below.
Name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
PrivateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

PrivateLinkServiceNetworkPoliciesEnabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

ServiceEndpointPolicyIds List<string>
The list of IDs of Service Endpoint Policies to associate with the subnet.
ServiceEndpoints List<string>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

AddressPrefixes This property is required. []string

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
VirtualNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
DefaultOutboundAccessEnabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
Delegations []SubnetDelegationArgs
One or more delegation blocks as defined below.
Name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
PrivateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

PrivateLinkServiceNetworkPoliciesEnabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

ServiceEndpointPolicyIds []string
The list of IDs of Service Endpoint Policies to associate with the subnet.
ServiceEndpoints []string

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

addressPrefixes This property is required. List<String>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
virtualNetworkName
This property is required.
Changes to this property will trigger replacement.
String
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
defaultOutboundAccessEnabled Boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations List<SubnetDelegation>
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. String
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies String

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled Boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

serviceEndpointPolicyIds List<String>
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints List<String>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

addressPrefixes This property is required. string[]

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
virtualNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
defaultOutboundAccessEnabled boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations SubnetDelegation[]
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

serviceEndpointPolicyIds string[]
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints string[]

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

address_prefixes This property is required. Sequence[str]

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
virtual_network_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
default_outbound_access_enabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations Sequence[SubnetDelegationArgs]
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. str
The name of the subnet. Changing this forces a new resource to be created.
private_endpoint_network_policies str

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

private_link_service_network_policies_enabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

service_endpoint_policy_ids Sequence[str]
The list of IDs of Service Endpoint Policies to associate with the subnet.
service_endpoints Sequence[str]

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

addressPrefixes This property is required. List<String>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
virtualNetworkName
This property is required.
Changes to this property will trigger replacement.
String
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
defaultOutboundAccessEnabled Boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations List<Property Map>
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. String
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies String

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled Boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

serviceEndpointPolicyIds List<String>
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints List<String>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

Outputs

All input properties are implicitly available as output properties. Additionally, the Subnet 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 Subnet Resource

Get an existing Subnet 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?: SubnetState, opts?: CustomResourceOptions): Subnet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        address_prefixes: Optional[Sequence[str]] = None,
        default_outbound_access_enabled: Optional[bool] = None,
        delegations: Optional[Sequence[SubnetDelegationArgs]] = None,
        name: Optional[str] = None,
        private_endpoint_network_policies: Optional[str] = None,
        private_link_service_network_policies_enabled: Optional[bool] = None,
        resource_group_name: Optional[str] = None,
        service_endpoint_policy_ids: Optional[Sequence[str]] = None,
        service_endpoints: Optional[Sequence[str]] = None,
        virtual_network_name: Optional[str] = None) -> Subnet
func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
resources:  _:    type: azure:network:Subnet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AddressPrefixes List<string>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

DefaultOutboundAccessEnabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
Delegations List<SubnetDelegation>
One or more delegation blocks as defined below.
Name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
PrivateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

PrivateLinkServiceNetworkPoliciesEnabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
ServiceEndpointPolicyIds List<string>
The list of IDs of Service Endpoint Policies to associate with the subnet.
ServiceEndpoints List<string>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

VirtualNetworkName Changes to this property will trigger replacement. string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
AddressPrefixes []string

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

DefaultOutboundAccessEnabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
Delegations []SubnetDelegationArgs
One or more delegation blocks as defined below.
Name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
PrivateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

PrivateLinkServiceNetworkPoliciesEnabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
ServiceEndpointPolicyIds []string
The list of IDs of Service Endpoint Policies to associate with the subnet.
ServiceEndpoints []string

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

VirtualNetworkName Changes to this property will trigger replacement. string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
addressPrefixes List<String>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

defaultOutboundAccessEnabled Boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations List<SubnetDelegation>
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. String
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies String

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled Boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
serviceEndpointPolicyIds List<String>
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints List<String>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

virtualNetworkName Changes to this property will trigger replacement. String
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
addressPrefixes string[]

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

defaultOutboundAccessEnabled boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations SubnetDelegation[]
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. string
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies string

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
serviceEndpointPolicyIds string[]
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints string[]

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

virtualNetworkName Changes to this property will trigger replacement. string
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
address_prefixes Sequence[str]

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

default_outbound_access_enabled bool
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations Sequence[SubnetDelegationArgs]
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. str
The name of the subnet. Changing this forces a new resource to be created.
private_endpoint_network_policies str

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

private_link_service_network_policies_enabled bool

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

resource_group_name Changes to this property will trigger replacement. str
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
service_endpoint_policy_ids Sequence[str]
The list of IDs of Service Endpoint Policies to associate with the subnet.
service_endpoints Sequence[str]

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

virtual_network_name Changes to this property will trigger replacement. str
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.
addressPrefixes List<String>

The address prefixes to use for the subnet.

NOTE: Currently only a single address prefix can be set as the Multiple Subnet Address Prefixes Feature is not yet in public preview or general availability.

defaultOutboundAccessEnabled Boolean
Enable default outbound access to the internet for the subnet. Defaults to true.
delegations List<Property Map>
One or more delegation blocks as defined below.
name Changes to this property will trigger replacement. String
The name of the subnet. Changing this forces a new resource to be created.
privateEndpointNetworkPolicies String

Enable or Disable network policies for the private endpoint on the subnet. Possible values are Disabled, Enabled, NetworkSecurityGroupEnabled and RouteTableEnabled. Defaults to Disabled.

NOTE: If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set private_endpoint_network_policies in the subnet to Disabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the private_endpoint_network_policies in the Subnet to Enabled/NetworkSecurityGroupEnabled/RouteTableEnabled. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource.

NOTE: See more details from Manage network policies for Private Endpoints.

privateLinkServiceNetworkPoliciesEnabled Boolean

Enable or Disable network policies for the private link service on the subnet. Defaults to true.

NOTE: When configuring Azure Private Link service, the explicit setting private_link_service_network_policies_enabled must be set to false in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the azure.network.SubnetNetworkSecurityGroupAssociation resource. See more details from Manage network policies for Private Link Services.

resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created.
serviceEndpointPolicyIds List<String>
The list of IDs of Service Endpoint Policies to associate with the subnet.
serviceEndpoints List<String>

The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web.

NOTE: In order to use Microsoft.Storage.Global service endpoint (which allows access to virtual networks in other regions), you must enable the AllowGlobalTagsForStorage feature in your subscription. This is currently a preview feature, please see the official documentation for more information.

virtualNetworkName Changes to this property will trigger replacement. String
The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created.

Supporting Types

SubnetDelegation
, SubnetDelegationArgs

Name This property is required. string
A name for this delegation.
ServiceDelegation This property is required. SubnetDelegationServiceDelegation
A service_delegation block as defined below.
Name This property is required. string
A name for this delegation.
ServiceDelegation This property is required. SubnetDelegationServiceDelegation
A service_delegation block as defined below.
name This property is required. String
A name for this delegation.
serviceDelegation This property is required. SubnetDelegationServiceDelegation
A service_delegation block as defined below.
name This property is required. string
A name for this delegation.
serviceDelegation This property is required. SubnetDelegationServiceDelegation
A service_delegation block as defined below.
name This property is required. str
A name for this delegation.
service_delegation This property is required. SubnetDelegationServiceDelegation
A service_delegation block as defined below.
name This property is required. String
A name for this delegation.
serviceDelegation This property is required. Property Map
A service_delegation block as defined below.

SubnetDelegationServiceDelegation
, SubnetDelegationServiceDelegationArgs

Name This property is required. string
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
Actions List<string>

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

Name This property is required. string
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
Actions []string

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

name This property is required. String
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
actions List<String>

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

name This property is required. string
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
actions string[]

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

name This property is required. str
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
actions Sequence[str]

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

name This property is required. String
The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Informatica.DataManagement/organizations, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DevOpsInfrastructure/pools, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/managedResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.Sql/servers, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, Qumulo.Storage/fileSystems, and Oracle.Database/networkAttachments.
actions List<String>

A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action.

NOTE: Azure may add default actions depending on the service delegation name and they can't be changed.

Import

Subnets can be imported using the resource id, e.g.

$ pulumi import azure:network/subnet:Subnet exampleSubnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1
Copy

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.