hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.61k stars 9k forks source link

Unable to Delete Permission Set due to ConflictException thrown for account assignment #26757

Open frankpengau opened 1 year ago

frankpengau commented 1 year ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

error deleting SSO Permission Set (arn:aws:sso:::permissionSet/ssoins-xxxxxxxxxxxxxxxx/ps-xxxxxxxxxxxxxxxx): ConflictException: Could not delete because PermissionSet has ApplicationProfile associated with it.

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

frankpengau commented 1 year ago

Note for future work:

haarchri commented 1 year ago

we hit the same issue - any progress here ?

patrickmoore-nc commented 1 year ago

Had the same issue. In my case it was a sneaky manual assignment that had been made in the Console. You can view all current assignments by selecting a permission set in the IAM Identity Centre Console, so it's easy to check.