NetworkSecurityRule
Manages a Network Security Rule.
NOTE on Network Security Groups and Network Security Rules: This provider currently provides both a standalone Network Security Rule resource, and allows for Network Security Rules to be defined in-line within the Network Security Group resource. At this time you cannot use a Network Security Group with in-line Network Security Rules in conjunction with any Network Security Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules.
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 US",
});
var exampleNetworkSecurityGroup = new Azure.Network.NetworkSecurityGroup("exampleNetworkSecurityGroup", new Azure.Network.NetworkSecurityGroupArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleNetworkSecurityRule = new Azure.Network.NetworkSecurityRule("exampleNetworkSecurityRule", new Azure.Network.NetworkSecurityRuleArgs
{
Priority = 100,
Direction = "Outbound",
Access = "Allow",
Protocol = "Tcp",
SourcePortRange = "*",
DestinationPortRange = "*",
SourceAddressPrefix = "*",
DestinationAddressPrefix = "*",
ResourceGroupName = exampleResourceGroup.Name,
NetworkSecurityGroupName = exampleNetworkSecurityGroup.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West US"),
})
if err != nil {
return err
}
exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "exampleNetworkSecurityGroup", &network.NetworkSecurityGroupArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
_, err = network.NewNetworkSecurityRule(ctx, "exampleNetworkSecurityRule", &network.NetworkSecurityRuleArgs{
Priority: pulumi.Int(100),
Direction: pulumi.String("Outbound"),
Access: pulumi.String("Allow"),
Protocol: pulumi.String("Tcp"),
SourcePortRange: pulumi.String("*"),
DestinationPortRange: pulumi.String("*"),
SourceAddressPrefix: pulumi.String("*"),
DestinationAddressPrefix: pulumi.String("*"),
ResourceGroupName: exampleResourceGroup.Name,
NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US")
example_network_security_group = azure.network.NetworkSecurityGroup("exampleNetworkSecurityGroup",
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_network_security_rule = azure.network.NetworkSecurityRule("exampleNetworkSecurityRule",
priority=100,
direction="Outbound",
access="Allow",
protocol="Tcp",
source_port_range="*",
destination_port_range="*",
source_address_prefix="*",
destination_address_prefix="*",
resource_group_name=example_resource_group.name,
network_security_group_name=example_network_security_group.name)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleNetworkSecurityGroup = new azure.network.NetworkSecurityGroup("exampleNetworkSecurityGroup", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleNetworkSecurityRule = new azure.network.NetworkSecurityRule("exampleNetworkSecurityRule", {
priority: 100,
direction: "Outbound",
access: "Allow",
protocol: "Tcp",
sourcePortRange: "*",
destinationPortRange: "*",
sourceAddressPrefix: "*",
destinationAddressPrefix: "*",
resourceGroupName: exampleResourceGroup.name,
networkSecurityGroupName: exampleNetworkSecurityGroup.name,
});Create a NetworkSecurityRule Resource
new NetworkSecurityRule(name: string, args: NetworkSecurityRuleArgs, opts?: CustomResourceOptions);def NetworkSecurityRule(resource_name, opts=None, access=None, description=None, destination_address_prefix=None, destination_address_prefixes=None, destination_application_security_group_ids=None, destination_port_range=None, destination_port_ranges=None, direction=None, name=None, network_security_group_name=None, priority=None, protocol=None, resource_group_name=None, source_address_prefix=None, source_address_prefixes=None, source_application_security_group_ids=None, source_port_range=None, source_port_ranges=None, __props__=None);func NewNetworkSecurityRule(ctx *Context, name string, args NetworkSecurityRuleArgs, opts ...ResourceOption) (*NetworkSecurityRule, error)public NetworkSecurityRule(string name, NetworkSecurityRuleArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args NetworkSecurityRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NetworkSecurityRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkSecurityRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkSecurityRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NetworkSecurityRule resource accepts the following input properties:
- Access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- Direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- Network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- Priority int
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- Protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- Resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- Description string
A description for this rule. Restricted to 140 characters.
- Destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- Destination
Address List<string>Prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- Destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- Destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- Destination
Port List<string>Ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- Name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- Source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- Source
Address List<string>Prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- Source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- Source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- Source
Port List<string>Ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- Access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- Direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- Network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- Priority int
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- Protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- Resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- Description string
A description for this rule. Restricted to 140 characters.
- Destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- Destination
Address []stringPrefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- Destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- Destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- Destination
Port []stringRanges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- Name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- Source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- Source
Address []stringPrefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- Source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- Source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- Source
Port []stringRanges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- priority number
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- description string
A description for this rule. Restricted to 140 characters.
- destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- destination
Address string[]Prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- destination
Port string[]Ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- source
Address string[]Prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- source
Port string[]Ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- access str
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- direction str
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- network_
security_ strgroup_ name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- priority float
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- protocol str
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- resource_
group_ strname The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- description str
A description for this rule. Restricted to 140 characters.
- destination_
address_ strprefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- destination_
address_ List[str]prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- destination_
application_ strsecurity_ group_ ids A List of destination Application Security Group ID’s
- destination_
port_ strrange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- destination_
port_ List[str]ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- name str
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- source_
address_ strprefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- source_
address_ List[str]prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- source_
application_ strsecurity_ group_ ids A List of source Application Security Group ID’s
- source_
port_ strrange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- source_
port_ List[str]ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkSecurityRule resource produces the following output properties:
Look up an Existing NetworkSecurityRule Resource
Get an existing NetworkSecurityRule 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?: NetworkSecurityRuleState, opts?: CustomResourceOptions): NetworkSecurityRulestatic get(resource_name, id, opts=None, access=None, description=None, destination_address_prefix=None, destination_address_prefixes=None, destination_application_security_group_ids=None, destination_port_range=None, destination_port_ranges=None, direction=None, name=None, network_security_group_name=None, priority=None, protocol=None, resource_group_name=None, source_address_prefix=None, source_address_prefixes=None, source_application_security_group_ids=None, source_port_range=None, source_port_ranges=None, __props__=None);func GetNetworkSecurityRule(ctx *Context, name string, id IDInput, state *NetworkSecurityRuleState, opts ...ResourceOption) (*NetworkSecurityRule, error)public static NetworkSecurityRule Get(string name, Input<string> id, NetworkSecurityRuleState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- Description string
A description for this rule. Restricted to 140 characters.
- Destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- Destination
Address List<string>Prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- Destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- Destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- Destination
Port List<string>Ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- Direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- Name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- Network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- Priority int
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- Protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- Resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- Source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- Source
Address List<string>Prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- Source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- Source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- Source
Port List<string>Ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- Access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- Description string
A description for this rule. Restricted to 140 characters.
- Destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- Destination
Address []stringPrefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- Destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- Destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- Destination
Port []stringRanges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- Direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- Name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- Network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- Priority int
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- Protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- Resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- Source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- Source
Address []stringPrefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- Source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- Source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- Source
Port []stringRanges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- access string
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- description string
A description for this rule. Restricted to 140 characters.
- destination
Address stringPrefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- destination
Address string[]Prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- destination
Application stringSecurity Group Ids A List of destination Application Security Group ID’s
- destination
Port stringRange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- destination
Port string[]Ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- direction string
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- name string
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- network
Security stringGroup Name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- priority number
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- protocol string
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- resource
Group stringName The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- source
Address stringPrefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- source
Address string[]Prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- source
Application stringSecurity Group Ids A List of source Application Security Group ID’s
- source
Port stringRange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- source
Port string[]Ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
- access str
Specifies whether network traffic is allowed or denied. Possible values are
AllowandDeny.- description str
A description for this rule. Restricted to 140 characters.
- destination_
address_ strprefix CIDR or destination IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
destination_address_prefixesis not specified.- destination_
address_ List[str]prefixes List of destination address prefixes. Tags may not be used. This is required if
destination_address_prefixis not specified.- destination_
application_ strsecurity_ group_ ids A List of destination Application Security Group ID’s
- destination_
port_ strrange Destination Port or Range. Integer or range between
0and65535or*to match any. This is required ifdestination_port_rangesis not specified.- destination_
port_ List[str]ranges List of destination ports or port ranges. This is required if
destination_port_rangeis not specified.- direction str
The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are
InboundandOutbound.- name str
The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created.
- network_
security_ strgroup_ name The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created.
- priority float
Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
- protocol str
Network protocol this rule applies to. Possible values include
Tcp,Udp,Icmp, or*(which matches all).- resource_
group_ strname The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created.
- source_
address_ strprefix CIDR or source IP range or * to match any IP. Tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. This is required if
source_address_prefixesis not specified.- source_
address_ List[str]prefixes List of source address prefixes. Tags may not be used. This is required if
source_address_prefixis not specified.- source_
application_ strsecurity_ group_ ids A List of source Application Security Group ID’s
- source_
port_ strrange Source Port or Range. Integer or range between
0and65535or*to match any. This is required ifsource_port_rangesis not specified.- source_
port_ List[str]ranges List of source ports or port ranges. This is required if
source_port_rangeis not specified.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.