generated from cyber-scot/terraform-module-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandard-nsg-rules.tf
85 lines (85 loc) · 3.1 KB
/
standard-nsg-rules.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
locals {
standard_nsg_list = {
"DenyAllInbound" = {
priority = 4096
direction = "Inbound"
access = "Deny"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "*"
},
"AllowAzureActiveDirectoryOutbound" = {
priority = 4050
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureActiveDirectory"
},
"AllowAzureBackupOutbound" = {
priority = 4045
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureBackup"
},
"AllowAzureCloudOutbound" = {
priority = 4040
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureCloud"
},
"AllowAzureKeyVaultOutbound" = {
priority = 4035
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureKeyVault"
},
"AllowAzureLoadBalancerOutbound" = {
priority = 4030
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureLoadBalancer"
},
"AllowAzureMonitorOutbound" = {
priority = 4025
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "AzureMonitor"
},
"AllowAzureStorageOutbound" = {
priority = 4020
direction = "Outbound"
access = "Allow"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "Storage"
}
}
final_nsg_rules = var.apply_standard_rules ? merge(local.standard_nsg_list, var.custom_nsg_rules) : var.custom_nsg_rules
}