Skip to content

Commit

Permalink
Merge pull request #340 from sergenyalcin/fix-publicaddress
Browse files Browse the repository at this point in the history
Add nil check for IPConfigurationPropertiesFormat
  • Loading branch information
ulucinar authored May 17, 2022
2 parents f4edc1c + dcd50e3 commit 8714e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/clients/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func GeneratePublicIPAddressObservation(az networkmgmt.PublicIPAddress) *v1alpha
v.ID = azure.ToString(az.ID)
v.Address = azure.ToString(az.IPAddress)
v.Version = string(az.PublicIPAddressVersion)
if az.IPConfiguration != nil {
if az.PublicIPAddressPropertiesFormat != nil && az.PublicIPAddressPropertiesFormat.IPConfiguration != nil && az.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat != nil {
v.IPConfiguration = &v1alpha3.IPConfiguration{
PrivateIPAllocationMethod: string(az.IPConfiguration.PrivateIPAllocationMethod),
PrivateIPAddress: az.IPConfiguration.PrivateIPAddress,
Expand Down

0 comments on commit 8714e68

Please sign in to comment.