Closed gss2002 closed 10 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Related #34003 Related #31096 Related #22570
@justinretzolk - This sums it up best right here basically
If the principal is also a data lake administrator, AWS grants implicit permissions that can cause errors using this resource. For example, AWS implicitly grants a principal/administrator permissions and permissions_with_grant_option of ALL, ALTER, DELETE, DESCRIBE, DROP, INSERT, and SELECT on a table. If you use this resource to explicitly grant the principal/administrator permissions but not permissions_with_grant_option of ALL, ALTER, DELETE, DESCRIBE, DROP, INSERT, and SELECT on the table, this resource will read the implicit permissions_with_grant_option and attempt to revoke them when the resource is destroyed. Doing so will cause an InvalidInputException: No permissions revoked error because you cannot revoke implicit permissions per se. To workaround this problem, explicitly grant the principal/administrator permissions and permissions_with_grant_option, which can then be revoked. Similarly, granting a principal/administrator permissions on a table with columns and providing column_names, will result in a InvalidInputException: Permissions modification is invalid error because you are narrowing the implicit permissions. Instead, set wildcard to true and remove the column_names.
Thank you!
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.
Terraform Core Version
1.6.2
AWS Provider Version
5.31.0
Affected Resource(s)
aws_lakeformation_permissions w/ lf_tag
Expected Behavior
No Changes to Apply or ability to destroy the terraform workspace
Actual Behavior
The plan decides that the resource needs to be replaced. Looking at the PLAN, Terraform is seeing false current values for both sets of permissions.
With 'permissions' it is removing and re-adding the 'ASSOCIATE' , which has not changed in the TF code at all and with 'permissions_with_grant_option' it is removing options that are not even defined in the TF code or in AWS
With 'permissions_with_grant_option' it is trying to remove permissions that never existed
Relevant Error/Panic Output Snippet
Terraform Configuration Files
main.tf
provider.tf
data.tf
variables.tf
Steps to Reproduce
or
Debug Output
No response
Panic Output
No response
Important Factoids
Using Terraform Enterprise
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lakeformation_permissions
Would you like to implement a fix?
None