skip to Main Content

Azure – Terraform conditional attribute setting

resource "azurerm_public_ip" "instance_public_ip" { count = var.assign_public_ip == "true" ? 1 : 0 name = "${var.name}-public-ip" location = var.location resource_group_name = var.resource_group_name allocation_method = "Dynamic" } resource "azurerm_network_interface" "main" { name = "${var.name}-nic" location = var.location resource_group_name = var.resource_group_name ip_configuration…

VIEW QUESTION
Back To Top
Search