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

lakeformation_permissions doesn't delete/revoke permission on destroy. #19063

Closed
MitchellGerdisch opened this issue Apr 22, 2021 · 3 comments · Fixed by #18505
Closed

lakeformation_permissions doesn't delete/revoke permission on destroy. #19063

MitchellGerdisch opened this issue Apr 22, 2021 · 3 comments · Fixed by #18505
Assignees
Labels
bug Addresses a defect in current functionality. service/lakeformation Issues and PRs that pertain to the lakeformation service.
Milestone

Comments

@MitchellGerdisch
Copy link

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

Affected Resource(s)

  • 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.

terraform {
  required_version = ">= 0.14.0"
}

provider "aws" {
  region = "us-east-1"
}

resource "aws_lakeformation_permissions" "add-pii-clientstest-tf" {
  principal   = "arn:aws:iam::xxxxxxxxx:role/xxxxxxxx"
  permissions = ["SELECT"]
  permissions_with_grant_option = ["SELECT"]

  table_with_columns {
    database_name = "mydb"
    name = "mytable"
    column_names =  ["mycolumn"]
  }
}

Debug Output

Panic Output

Expected Behavior

Management of a lakeformation_permission resource should fully revoke the permission(s) on destroy.

Actual Behavior

The permission remains.

Steps to Reproduce

  1. Create an Athena db/table
  2. Create a role.
  3. Create a lakeformation permission resource for the role on the Athena table as per the code above.
  4. terraform apply and see that terraform indicates the permission was created
  5. Verify the permission was created in AWS console. Note that it has both the "Permission" and "Grantable Permission" setting.
  6. terraform destroyand see that terraform indicates the permission was deleted.
  7. Look at the AWS console and see that the permission still exists - although the "Grantable" has been removed.

Important Factoids

References

  • #0000
@YakDriver
Copy link
Member

YakDriver commented Apr 29, 2021

Additional Principals Perm Delete/Revoke
Related #16848 (Issue)
Related #16916
Related #18034 (Issue)
Related #18374
Related #17633 (Issue)
Related #18446 (Issue)
Related #18505
Related #19063 (Issue)
Related #19064 (Issue)

@ghost
Copy link

ghost commented May 7, 2021

This has been released in version 3.39.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 for triage. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 6, 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 Jun 6, 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/lakeformation Issues and PRs that pertain to the lakeformation service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants