I have this code: ``` const publicIp = new azure...
# azure
a
I have this code:
Copy code
const 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? ``````
s
Copy code
publicIp.Apply(x=> if(x.ipAddress)...