I have a resource that returns an ID during apply. I have a second resource that needs to consume that ID for one of its attributes but it needs a list of strings. What would be the best method of accomplishing this? This is all within a single .tf file. Specifically I’m looking at backend_address_pool_ids.
resource "azurerm_lb_backend_address_pool" "ilb-backend" {
loadbalancer_id = azurerm_lb.ilb.id
name = "BackEndPool"
}
resource "azurerm_lb_probe" "ilb-probe" {
loadbalancer_id = azurerm_lb.ilb.id
name = "lbprobe"
port = 8008
}
resource "azurerm_lb_rule" "lb-haports-rule" {
loadbalancer_id = azurerm_lb.ilb.id
name = "rule-haports-rule"
protocol = "All"
frontend_port = 0
backend_port = 0
frontend_ip_configuration_name = "ilb-pip-edge-eastus"
probe_id = azurerm_lb_probe.ilb-probe.id
backend_address_pool_ids = azurerm_lb_backend_address_pool.ilb-backend.id