Skip to content

Commit

Permalink
Fix allowlist read when name is null (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
erademacher committed Feb 8, 2023
1 parent 0f7d36b commit 321ca81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/provider/networking_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ func (r *allowListResource) Read(ctx context.Context, req resource.ReadRequest,
// Update flags in case they've changed externally.
state.Sql = types.BoolValue(entry.GetSql())
state.Ui = types.BoolValue(entry.GetUi())
state.Name = types.StringValue(entry.GetName())
if entry.Name == nil {
state.Name = types.StringNull()
} else {
state.Name = types.StringValue(entry.GetName())
}
diags = resp.State.Set(ctx, &state)
resp.Diagnostics.Append(diags...)
return
Expand Down

0 comments on commit 321ca81

Please sign in to comment.