2021-06-06T23:00:00Z
Hi
Have spent hours on this. No avail.
I have a module that creates a VM. the module is named VM-Platform-Admin.
inside this module i have an outputs.tf like this,
output “instance_ip” {
value = “azurerm_network_interface.network_interface.private_ip_address”
}
my module is using count. I am able to build a number of VM’s fine. this isnt the problem.
I am now trying to create an app gateway and reference the Ip address inside the NIC of the VM that was created with the VM-Platform-Admin module.
I have left some of the code out for the azurerm_application_gateway. the problem is with the backend_address_pool.
backend_address_pool {
name = backend1
private_ip_addresses = [module.VM-Platform-Admin[0].instance_ip]
}
The error i get when running an apply is
> Error: “backend_address_pool.0.ip_addresses.0” is not a valid IPv4 address: “azurerm_network_interface.network_interface.private_ip_address”
Anyone had any similar problems with referencing this?