Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix: Panic in security.jit_network_access_policies (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbernays authored Jun 14, 2022
1 parent 77c7e50 commit 3604559
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/services/security/jit_network_access_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ func fetchSecurityJitNetworkAccessPolicyVirtualMachines(ctx context.Context, met
}
func resolveSecurityJitNetworkAccessPolicyVirtualMachinesPublicIpAddress(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource, c schema.Column) error {
p := resource.Item.(security.JitNetworkAccessPolicyVirtualMachine)
if p.PublicIPAddress == nil {
return nil
}
ip := net.ParseIP(*p.PublicIPAddress)
return diag.WrapError(resource.Set(c.Name, ip))
}
Expand Down

0 comments on commit 3604559

Please sign in to comment.