So, given resource producing tunnel_ips. tunnel_ips is set of string. One IP is public and second is private IP. I need to fetch public IP and use it in another resource. There is no way I can determine which one of those 2 is public. Is it possible to create output where existing variable structure would go one level below tunnel_ips and point to public_ip, so I can access it with something like: azurerm_vpn_gateway.azure_vpngw.bgp_settings[0].instance_0_bgp_peering_address[0].tunnel_ips.public_ip
With current behavior I can never be sure that I fetch public IP. If you have any hint , would you pease let me know.
Community Note
Terraform (and AzureRM Provider) Version
Terraform - 0.14.11 azurerm - 2.71.0
Terraform Configuration Files
Expected Behaviour
To have unique identification of public IP in output.
Actual Behaviour
resource given above producing state file which is (I am coping just part of it I consider relevant here)
So, given resource producing tunnel_ips. tunnel_ips is set of string. One IP is public and second is private IP. I need to fetch public IP and use it in another resource. There is no way I can determine which one of those 2 is public. Is it possible to create output where existing variable structure would go one level below tunnel_ips and point to public_ip, so I can access it with something like: azurerm_vpn_gateway.azure_vpngw.bgp_settings[0].instance_0_bgp_peering_address[0].tunnel_ips.public_ip With current behavior I can never be sure that I fetch public IP. If you have any hint , would you pease let me know.
Steps to Reproduce
Create a resource mentioned above.