adamant-leather-41068
12/21/2023, 11:16 PMconst publicIp = new azure_native.network.PublicIPAddress(`${alphaonly_name(config.nameConfig)}-publicIP`, {
resourceGroupName: resourceGroup.name,
publicIPAllocationMethod: azure_native.network.IPAllocationMethod.Dynamic,
});
publicIp.ipAddress.apply(ip => {
if (ip) {
//setupServices(ip, sshPrivateKey, config)
console.log(`IP address is ${ip}`)
} else {
//throw new Error(`Could not setup services as IP address was ${ip}`);
console.log(`Could not setup services as IP address was ${ip}`)
}
})
In the apply
function ip
is always undefined, but I can look in the Azure console and see a new IP address is created. What am I doing wrong?
``````some-ambulance-32599
12/29/2023, 9:27 AMpublicIp.Apply(x=> if(x.ipAddress)...