Debian Codegraph @

test/tf/azurerm/modules/virtual_machine/1-network.tf

raw
1 resource "azurerm_public_ip" "external" {
2 name = "${var.name}-pip"
3 location = "${var.location}"
4 resource_group_name = "${var.resource_group_name}"
5 public_ip_address_allocation = "static"
6 domain_name_label = "${var.name}"
7 }
8
9 resource "azurerm_network_interface" "internal" {
10 resource_group_name = "${var.resource_group_name}"
11 location = "${var.location}"
12 name = "${var.resource_group_name}-${random_string.resource_name.result}"
13
14 ip_configuration {
15 name = "private"
16 subnet_id = "${var.subnet_id}"
17 private_ip_address_allocation = "dynamic"
18 public_ip_address_id = "${azurerm_public_ip.external.id}"
19 }
20
21 tags = "${var.tags}"
22 }
23
24 resource "random_string" "resource_name" {
25 length = 16
26 special = false
27 upper = false
28 number = false
29 }