Hi I was wondering how to get he public ips of each node pragmatically in terraform
so far I have
s_ssh_key), base64decode(data.azurerm_key_vault_secret.data_ssh_node_key.value))
}
}
default_node_pool {
name = var.pool_name
min_count = var.min_node_count
max_count = var.max_node_count
vm_size = var.vm_size
availability_zones = var.availability_zones
enable_auto_scaling = true
enable_node_public_ip = true
}
identity {
type = "SystemAssigned"
}
role_based_access_control {
enabled = true
}
tags = {
Environment = "Production"
}
}
i was wondering if to get the public IPs for each node it would something in the data for the property enable_node_public_ip = true but all I see in data for default_node_pool is id being exported and not public ips, it seems like it is possible to use
data "azurerm_virtual_machine_scale_set" "vmssips" {
name = "existing"
resource_group_name = "existing"
}
but as we haven’t explicitly created a vmss I’m not sure what the name would be to get the ips, is there a way to find this out programmatically in terraform?
additional resources