generated from qbeyond/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.tf
17 lines (15 loc) · 820 Bytes
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
locals {
public_ip = {
name = coalesce(var.name_overrides.public_ip, "pip-vm-${var.virtual_machine_config.hostname}") # change to naming convention=
}
nic = {
name = coalesce(var.name_overrides.nic, "nic-${var.virtual_machine_config.hostname}-${replace(var.subnet.address_prefixes[0], "/[./]/", "-")}")
ip_config_name = coalesce(var.name_overrides.nic_ip_config, "internal")
}
virtual_machine = {
name = coalesce(var.name_overrides.virtual_machine, "vm-${var.virtual_machine_config.hostname}")
tags = merge(var.tags, { "Severity Group Monthly" = var.severity_group }, { "Update allowed" = local.update_allowed })
}
os_disk_name = coalesce(var.name_overrides.os_disk, "disk-${var.virtual_machine_config.hostname}-Os")
update_allowed = var.update_allowed ? "yes" : "no"
}