-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadf.tf
More file actions
36 lines (30 loc) · 1.24 KB
/
Copy pathadf.tf
File metadata and controls
36 lines (30 loc) · 1.24 KB
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
resource "azurerm_subnet" "adf-subnet" {
name = "${var.DeploymentLifecycle}-${var.AppName}-${var.LOB}-adfsubnet"
resource_group_name = "${azurerm_resource_group.pdw-rg.name}"
virtual_network_name = "${azurerm_virtual_network.pdw-vnet.name}"
address_prefix = "${cidrsubnet(var.vnet2_address, 2, 2)}"
#service_endpoints = ["Microsoft.Sql"]
}
resource "azurerm_network_security_group" "adf" {
name = "${var.DeploymentLifecycle}-${var.AppName}-${var.LOB}-adfnsg"
location = "${var.azure_region}"
resource_group_name = "${azurerm_resource_group.pdw-rg.name}"
security_rule {
name = "rdp"
priority = 300
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "3389"
source_address_prefix = "*"
destination_address_prefix = "*"
}
tags {
environment = "${var.DeploymentLifecycle}"
}
}
resource "azurerm_subnet_network_security_group_association" "adf" {
subnet_id = "${azurerm_subnet.adf-subnet.id}"
network_security_group_id = "${azurerm_network_security_group.adf.id}"
}