nsg_config: Network security group configuration

Description Usage Arguments See Also Examples

View source: R/nsg_config.R

Description

Network security group configuration

Usage

1
2
3
4
5
6
nsg_config(rules = list(), ...)

nsg_rule(name, dest_port = "*", dest_addr = "*", dest_asgs = NULL,
  source_port = "*", source_addr = "*", source_asgs = NULL,
  access = "allow", direction = "inbound", protocol = "Tcp",
  priority = NULL)

Arguments

rules

for nsg_config, a list of security rule objects, each obtained via a call to nsg_rule.

...

Other named arguments that will be treated as resource properties.

name

For nsg_rule, a name for the rule.

dest_port, dest_addr, dest_asgs

For nsg_rule, the destination port, address range, and application security groups for a rule.

source_port, source_addr, source_asgs

For nsg_rule, the source port, address range, and application security groups for a rule.

access

For nsg_rule, the action to take: "allow" or "deny".

direction

For nsg_rule, the direction of traffic: "inbound" or "outbound".

protocol

For nsg_rule, the network protocol: either "Tcp" or "Udp".

priority

For nsg_rule, the rule priority. If NULL, this will be set automatically by AzureVM.

See Also

create_vm, vm_config, vmss_config, nsg_rules for some predefined security rules

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
nsg_config()
nsg_config(list(nsg_rule_allow_ssh))  # for Linux
nsg_config(list(nsg_rule_allow_rdp))  # for Windows
nsg_config(list(nsg_rule_allow_http, nsg_rule_allow_https))

# a custom rule
nsg_config(list(
    nsg_rule(
        name="whitelist",
        source_addr="114.198.100.0/24",
        access="allow",
        protocol="*"
    )
))

AzureVM documentation built on Oct. 23, 2020, 5:20 p.m.