[Bug]: Lake Formation Resource Permission parameters need to be Lexical order #31096
Labels
bug
Addresses a defect in current functionality.
service/lakeformation
Issues and PRs that pertain to the lakeformation service.
Terraform Core Version
1.3.6
AWS Provider Version
4.64.0
Affected Resource(s)
Expected Behavior
The following code block should not lead to deletion/creation of resources if unchanged.
Actual Behavior
The above code block leads to deletion and creation of the lake formation permission on multiple runs due to internal/implicit reordering in the provider to lexical order.
![image](https://user-images.githubusercontent.com/491396/235586881-4e120d7e-fbc5-4988-9217-149be2dd9d31.png)
Changing the source in Terraform for permissions to be lexical order stops this unexpected behaviour.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
N/A
Steps to Reproduce
N/A
Debug Output
N/A
Panic Output
N/A
Important Factoids
The documentation hints towards implicit lexical ordering. This helped with troubleshooting this issue. Happy to document this in the provider explicitly.
References
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lakeformation_permissions
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: