-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstorage.tf
41 lines (36 loc) · 1.47 KB
/
storage.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
resource "azurerm_storage_account" "genericSA" {
name = var.storageAccountName
resource_group_name = azurerm_resource_group.genericRG.name
location = azurerm_resource_group.genericRG.location
account_kind = "StorageV2"
account_tier = "Standard"
account_replication_type = "GRS"
# enable_advanced_threat_protection = true
/* TODO create proper network rules for all subnets
network_rules {
default_action = "Allow"
ip_rules = ["138.88.132.45"]
virtual_network_subnet_ids = ["${azurerm_subnet.frontEndLayer.id}", "${azurerm_subnet.appLayer.id}", "${azurerm_subnet.backEndLayer.id}"]
}
*/
tags = var.tags
}
resource "azurerm_storage_container" "container" {
name = "data"
storage_account_name = azurerm_storage_account.genericSA.name
container_access_type = "private"
}
resource "azurerm_storage_account" "ADLS" {
name = "${var.storageAccountName}adsl"
resource_group_name = azurerm_resource_group.genericRG.name
location = azurerm_resource_group.genericRG.location
account_tier = "Standard"
account_replication_type = "GRS"
account_kind = "StorageV2"
is_hns_enabled = "true"
tags = var.tags
}
resource "azurerm_storage_data_lake_gen2_filesystem" "ADLSFileSystemTFMS" {
name = "tfms"
storage_account_id = azurerm_storage_account.ADLS.id
}