-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
75 lines (65 loc) · 2.32 KB
/
main.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
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.46.0"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "thor-terraform-rg" {
name = "thorterraform"
location = "West Europe"
tags = {
environment = "dev"
}
}
resource "azurerm_virtual_network" "thor-terraform-vn" {
name = "thor1-network"
resource_group_name = azurerm_resource_group.thor-terraform-rg.name
location = azurerm_resource_group.thor-terraform-rg.location
address_space = ["10.171.17.0/24"]
tags = {
environment = "dev"
}
}
resource "azurerm_subnet" "thor-terraform-subnet" {
name = "thor-subnet"
resource_group_name = azurerm_resource_group.thor-terraform-rg.name
virtual_network_name = azurerm_virtual_network.thor-terraform-vn.name
address_prefixes = ["10.171.17.16/28"]
delegation {
name = "delegation"
service_delegation {
name = "Microsoft.Netapp/volumes"
actions = ["Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/join/action"]
}
}
}
resource "azurerm_netapp_account" "thor-terraform-NA" {
name = "thor-Netappaccount"
location = azurerm_resource_group.thor-terraform-rg.location
resource_group_name = azurerm_resource_group.thor-terraform-rg.name
}
resource "azurerm_netapp_pool" "thor-terraform-POOL" {
name = "thor-NetApp-pool"
location = azurerm_resource_group.thor-terraform-rg.location
resource_group_name = azurerm_resource_group.thor-terraform-rg.name
account_name = azurerm_netapp_account.thor-terraform-NA.name
service_level = "Standard"
size_in_tb = 4
}
resource "azurerm_netapp_volume" "thor-vol" {
name = "thor-vol-netappvolume1"
location = azurerm_resource_group.thor-terraform-rg.location
resource_group_name = azurerm_resource_group.thor-terraform-rg.name
account_name = azurerm_netapp_account.thor-terraform-NA.name
pool_name = azurerm_netapp_pool.thor-terraform-POOL.name
volume_path = "my-unique-file-path"
service_level = "Standard"
subnet_id = azurerm_subnet.thor-terraform-subnet.id
protocols = ["NFSv3"]
storage_quota_in_gb = 100
}