Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lake Formation permissions: Delete problem with IAM_ALLOWED_PRINCIPALS #20047

Closed
YakDriver opened this issue Jul 1, 2021 · 2 comments · Fixed by #20108
Closed

Lake Formation permissions: Delete problem with IAM_ALLOWED_PRINCIPALS #20047

YakDriver opened this issue Jul 1, 2021 · 2 comments · Fixed by #20108
Labels
bug Addresses a defect in current functionality. service/glue Issues and PRs that pertain to the glue service. service/lakeformation Issues and PRs that pertain to the lakeformation service.
Milestone

Comments

@YakDriver
Copy link
Member

YakDriver commented Jul 1, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.1
AWS v3.47.0

Affected Resource

  • aws_lakeformation_permissions

Terraform Configuration Files

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

resource "aws_glue_catalog_database" "test" {
  name = "madagascar-database"
}

resource "aws_lakeformation_data_lake_settings" "test" {
  admins = ["arn:aws:iam::<account_id>:role/<role_name>"]
}

resource "aws_lakeformation_permissions" "test" {
  permissions = ["ALL"]
  principal   = "IAM_ALLOWED_PRINCIPALS"

  database {
    name = aws_glue_catalog_database.test.name
  }
}

Debug Output

aws_lakeformation_data_lake_settings.test: Destroying... [id=1098952520]
aws_lakeformation_permissions.test: Destroying... [id=192198287]
aws_lakeformation_data_lake_settings.test: Destruction complete after 1s
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 10s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 20s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 30s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 40s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 50s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m0s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m10s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m20s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m30s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m40s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 1m50s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m0s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m10s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m20s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m30s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m40s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 2m50s elapsed]
aws_lakeformation_permissions.test: Still destroying... [id=192198287, 3m0s elapsed]
╷
│ Error: unable to revoke LakeFormation Permissions (input: {
│   Permissions: ["ALL"],
│   PermissionsWithGrantOption: [],
│   Principal: {
│     DataLakePrincipalIdentifier: "IAM_ALLOWED_PRINCIPALS"
│   },
│   Resource: {
│     Database: {
│       CatalogId: "<account id>",
│       Name: "madagascar-database"
│     }
│   }
│ }): InvalidInputException: No permissions revoked. Grantee does not does not have:[ALL]

Expected Behavior

Resources deleted.

Actual Behavior

  1. It reports an error on destroy
  2. Does not the delete the dependent resource aws_glue_catalog_database

Steps to Reproduce

  1. terraform apply
  2. terraform destroy

References

@github-actions github-actions bot added service/glue Issues and PRs that pertain to the glue service. service/lakeformation Issues and PRs that pertain to the lakeformation service. labels Jul 1, 2021
@YakDriver YakDriver added the bug Addresses a defect in current functionality. label Jul 1, 2021
@github-actions github-actions bot added this to the v3.49.0 milestone Jul 8, 2021
@github-actions
Copy link

github-actions bot commented Jul 8, 2021

This functionality has been released in v3.49.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Aug 8, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/glue Issues and PRs that pertain to the glue service. service/lakeformation Issues and PRs that pertain to the lakeformation service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant