-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
37 lines (34 loc) · 1.54 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
locals {
secondary_configuration = var.required_secondary_ip_configuration == true ? { dummy_create = true } : {}
}
resource "azurerm_network_interface" "az_nic" {
name = var.network_interface_name
location = var.location
resource_group_name = var.resource_group_name
dns_servers = var.dns_servers
enable_ip_forwarding = var.enable_ip_forwarding
enable_accelerated_networking = var.enable_accelerated_networking
internal_dns_name_label = var.internal_dns_name_label
tags = var.tags
ip_configuration {
primary = true
name = var.ip_configuration_name
subnet_id = var.subnet_id
private_ip_address_allocation = var.private_ip_address_allocation
private_ip_address_version = var.private_ip_address_version
public_ip_address_id = var.public_ip_address_id
private_ip_address = var.private_ip_address
}
dynamic "ip_configuration" {
for_each = local.secondary_configuration
content {
# TBD configuration for secondary ip configuration
name = var.secondary_ip_configuration_name
#subnet_id = var.subnet_id
#private_ip_address_allocation = var.private_ip_address_allocation
#private_ip_address_version = var.private_ip_address_version
#public_ip_address_id = var.public_ip_address_id
#private_ip_address = var.private_ip_address
}
}
}