Skip to content

Commit

Permalink
Merge pull request #21773 from haarchri/fix/sso-permissionset
Browse files Browse the repository at this point in the history
fix missing provisionSsoAdminPermissionSet() after delete a policy
  • Loading branch information
anGie44 authored Dec 17, 2021
2 parents 149048f + f3f080c commit 1915c4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/21773.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_ssoadmin_managed_policy_attachment: Fix missing call to `ProvisionPermissionSet` after detaching the managed policy
```
5 changes: 5 additions & 0 deletions internal/service/ssoadmin/managed_policy_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func resourceManagedPolicyAttachmentDelete(d *schema.ResourceData, meta interfac
return fmt.Errorf("error detaching Managed Policy (%s) from SSO Permission Set (%s): %w", managedPolicyArn, permissionSetArn, err)
}

// Provision ALL accounts after detaching the managed policy
if err := provisionSsoAdminPermissionSet(conn, permissionSetArn, instanceArn); err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 1915c4c

Please sign in to comment.