Skip to content

Commit

Permalink
Merge pull request #704 from Juniper/ip-links-handle-404
Browse files Browse the repository at this point in the history
Fix 404 handling in `apstra_datacenter_ip_link_addressing` resource
  • Loading branch information
chrismarget-j authored Jul 11, 2024
2 parents 9b38a57 + a447db4 commit f5350e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apstra/resource_datacenter_ip_link_addressing.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (o *resourceDatacenterIpLinkAddressing) Read(ctx context.Context, req resou
bp, err := o.getBpClientFunc(ctx, state.BlueprintId.ValueString())
if err != nil {
if utils.IsApstra404(err) {
resp.Diagnostics.AddError(fmt.Sprintf("Blueprint %s not found", state.BlueprintId), err.Error())
resp.State.RemoveResource(ctx)
return
}
resp.Diagnostics.AddError("Failed to create Blueprint client", err.Error())
Expand Down Expand Up @@ -272,7 +272,7 @@ func (o *resourceDatacenterIpLinkAddressing) Update(ctx context.Context, req res
bp, err := o.getBpClientFunc(ctx, plan.BlueprintId.ValueString())
if err != nil {
if utils.IsApstra404(err) {
resp.State.RemoveResource(ctx)
resp.Diagnostics.AddError(fmt.Sprintf("Blueprint %s not found", plan.BlueprintId), err.Error())
return
}
resp.Diagnostics.AddError("failed to create blueprint client", err.Error())
Expand Down

0 comments on commit f5350e9

Please sign in to comment.