-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
54 lines (47 loc) · 1.64 KB
/
Copy pathmain.tf
File metadata and controls
54 lines (47 loc) · 1.64 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.75.0"
}
}
}
provider "azurerm" {
features {
}
}
resource "azurerm_resource_group" "default" {
name = var.resource_group_name
location = var.location
}
module "network" {
vnet_name = var.vnet_name
vnet_address_space = var.vnet_address_space
source = "./modules/network"
resource_group_name = azurerm_resource_group.default.name
location = azurerm_resource_group.default.location
subnet_name = var.subnet_name
dns_label_prefix = var.dns_label
dns_custom_label = var.dns_custom_label
subnet_address_prefix = var.subnet_address_prefix
nsg_name = var.network_security_group_name
pip_name = var.public_ip_address_name
}
module "computing" {
source = "./modules/compute"
resource_group_name = azurerm_resource_group.default.name
location = azurerm_resource_group.default.location
vm_name = var.vm_name
subnet_id = module.network.subnet_id
public_ip_address_id = module.network.pip_id
admin_username = var.admin_username
path_to_ssh_key = var.ssh_key_public
vm_size = var.vm_size
network_security_group_id = module.network.network_security_group_id
}
module "storage_account" {
source = "./modules/storage"
resource_group_name = azurerm_resource_group.default.name
location = azurerm_resource_group.default.location
storage_account_name = var.storage_account_name
}