forked from aztfmod/terraform-azurerm-caf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtual_machines.tf
executable file
·40 lines (33 loc) · 2.02 KB
/
virtual_machines.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
module "virtual_machines" {
source = "./modules/compute/virtual_machine"
depends_on = [
module.availability_sets,
module.dynamic_keyvault_secrets,
module.keyvault_access_policies,
module.keyvault_access_policies_azuread_apps,
module.proximity_placement_groups,
module.network_security_groups
]
for_each = local.compute.virtual_machines
application_security_groups = local.combined_objects_application_security_groups
availability_sets = local.combined_objects_availability_sets
base_tags = try(local.global_settings.inherit_tags, false) ? module.resource_groups[each.value.resource_group_key].tags : {}
boot_diagnostics_storage_account = try(local.combined_diagnostics.storage_accounts[each.value.boot_diagnostics_storage_account_key].primary_blob_endpoint, {})
client_config = local.client_config
diagnostics = local.combined_diagnostics
disk_encryption_sets = local.combined_objects_disk_encryption_sets
global_settings = local.global_settings
keyvaults = local.combined_objects_keyvaults
location = lookup(each.value, "region", null) == null ? module.resource_groups[each.value.resource_group_key].location : local.global_settings.regions[each.value.region]
managed_identities = local.combined_objects_managed_identities
network_security_groups = local.combined_objects_network_security_groups
proximity_placement_groups = local.combined_objects_proximity_placement_groups
public_ip_addresses = local.combined_objects_public_ip_addresses
recovery_vaults = local.combined_objects_recovery_vaults
resource_group_name = module.resource_groups[each.value.resource_group_key].name
settings = each.value
vnets = local.combined_objects_networking
}
output "virtual_machines" {
value = module.virtual_machines
}