You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-5Lines changed: 22 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,10 @@ This module includes a a set of pre-defined rules for commonly used protocols (f
15
15
16
16
The following example demonstrate how to use the network-security-group module with a combination of predefined and custom rules.
17
17
18
+
~> **NOTE:**`source_address_prefix` is defined differently in `predefined_rules` and `custom_rules`.
19
+
`predefined_rules` uses `var.source_address_prefix` defined in the module.`var.source_address_prefix` is of type list(string), but allowed only one element (CIDR, `*`, source IP range or Tags). For more source_address_prefixes, please use `var.source_address_prefixes`. The same for `var.destination_address_prefix` in `predefined_rules`.
20
+
`custom_rules` uses `source_address_prefix` defined in the block `custom_rules`. `source_address_prefix` is of type string (CIDR, `*`, source IP range or Tags). For more source_address_prefixes, please use `source_address_prefixes` in block `custom_rules`. The same for `destination_address_prefix` in `custom_rules`.
Copy file name to clipboardExpand all lines: variables.tf
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -40,30 +40,32 @@ variable "custom_rules" {
40
40
default=[]
41
41
}
42
42
43
-
# source address prefix to be applied to all rules
43
+
# source address prefix to be applied to all predefined rules
44
+
# list(string) only allowed one element (CIDR, `*`, source IP range or Tags)
45
+
# Example ["10.0.3.0/24"] or ["VirtualNetwork"]
44
46
variable"source_address_prefix" {
45
47
type=list(string)
46
48
default=["*"]
49
+
}
47
50
48
-
# Example ["10.0.3.0/24"] or ["VirtualNetwork"]
51
+
# Destination address prefix to be applied to all predefined rules
52
+
# Example ["10.0.3.0/32","10.0.3.128/32"]
53
+
variable"source_address_prefixes" {
54
+
type=list(string)
55
+
default=null
49
56
}
50
57
51
-
# Destination address prefix to be applied to all rules
58
+
# Destination address prefix to be applied to all predefined rules
59
+
# list(string) only allowed one element (CIDR, `*`, source IP range or Tags)
60
+
# Example ["10.0.3.0/24"] or ["VirtualNetwork"]
52
61
variable"destination_address_prefix" {
53
62
type=list(string)
54
63
default=["*"]
55
-
56
-
# Example ["10.0.3.0/32","10.0.3.128/32"] or ["VirtualNetwork"]
57
64
}
58
65
59
-
variable"source_application_security_group_ids" {
60
-
description="(Optional) A List of source Application Security Group IDs. Conflicted with `source_address_prefix`. Once assigned with `source_address_prefix`, it'll have a higher priority."
description="(Optional) A List of destination Application Security Group IDs. Conflicted with `destination_address_prefix`. Once assigned with `destination_address_prefix`, it'll have a higher priority."
67
-
type=set(string)
68
-
default=[]
69
-
}
66
+
# Destination address prefix to be applied to all predefined rules
0 commit comments