Skip to content

Commit

Permalink
Re-add locking for service principal
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer authored Jan 18, 2023
1 parent 8f264a8 commit de4aab4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ func servicePrincipalTokenSigningCertificateResourceCreate(ctx context.Context,
tf.LockByName(servicePrincipalResourceName, objectId)
defer tf.UnlockByName(servicePrincipalResourceName, objectId)

tf.LockByName(servicePrincipalResourceName, objectId)
defer tf.UnlockByName(servicePrincipalResourceName, objectId)

key, _, err := client.AddTokenSigningCertificate(ctx, objectId, keyCreds)
if err != nil {
return tf.ErrorDiagF(err, "Could not add token signing certificate to service principal with object ID: %q", objectId)
Expand Down

0 comments on commit de4aab4

Please sign in to comment.