Skip to content

Commit

Permalink
Resolve issue CiscoDevNet#353
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Oct 22, 2024
1 parent 7c868f5 commit eb70e97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions gen/definitions/generic/security_policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ get_rest_endpoint: /template/policy/security/definition/
has_version: true
id_from_query_path: data
id_from_query_path_attribute: policyId
get_before_delete: true
delete_mutex: true
doc_category: (Classic) Security Policies
attributes:
Expand Down
1 change: 1 addition & 0 deletions internal/provider/resource_sdwan_security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ func (r *SecurityPolicyResource) Delete(ctx context.Context, req resource.Delete

tflog.Debug(ctx, fmt.Sprintf("%s: Beginning Delete", state.Name.ValueString()))

_, _ = r.client.Get(state.getPath())
r.updateMutex.Lock()
res, err := r.client.Delete(state.getPath() + url.QueryEscape(state.Id.ValueString()))
r.updateMutex.Unlock()
Expand Down

0 comments on commit eb70e97

Please sign in to comment.