-
Notifications
You must be signed in to change notification settings - Fork 1
/
security.tf
53 lines (47 loc) · 1.7 KB
/
security.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
resource "azurerm_network_security_group" "genericNSG" {
name = "${var.suffix}-RDPSSHSG"
location = azurerm_resource_group.genericRG.location
resource_group_name = azurerm_resource_group.genericRG.name
security_rule {
name = "RDP"
priority = 100
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "3389"
source_address_prefixes = var.sourceIPs
#source_address_prefix = "162.58.0.210"
destination_address_prefix = "VirtualNetwork"
}
security_rule {
name = "SSH"
priority = 110
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "22"
source_address_prefixes = var.sourceIPs
#source_address_prefix = "162.58.0.210"
destination_address_prefix = "VirtualNetwork"
}
security_rule {
name = "HTTP"
priority = 120
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "80"
source_address_prefix = "*"
destination_address_prefix = "VirtualNetwork"
}
tags = var.tags
}
resource "azurerm_network_security_group" "dataBricksNSG" {
name = "${var.suffix}-DataBricksSG"
location = azurerm_resource_group.genericRG.location
resource_group_name = azurerm_resource_group.genericRG.name
tags = var.tags
}