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.74k stars 9.1k forks source link

Lake Formation LF-Tag Expression Limit Update #30095

Closed hocanint-amzn closed 1 year ago

hocanint-amzn commented 1 year ago

Description

There is a discrepancy between the number items that are allowed in an LF-Tag expression when granting permissions that is limiting some use cases. The current code assumes a limit of 5, where as the service documentation does not specify a limit (See references). We would like to update the limit to match the documentation. If we feel uncomfortable not leaving a limit to the number of items in the expression, a safe limit would be 20.

Just to note, I am an employee in the Lake Formation Service team at AWS and this is a request on behalf some our customers.

Thank you!

References

Location where the limit exists:

Would you like to implement a fix?

No

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 1 year ago

Related: #26633 Related: #26546

hocanint-amzn commented 1 year ago

@justinretzolk Thanks for taking a look a this issue. Just to confirm that this is a different limit that is being hit than the related issues posted, and thus is not a duplicate. Just want to make sure that we are not closing out this issue. Thanks!

justinretzolk commented 1 year ago

Hey @hocanint-amzn, thanks for confirming those are different limits, and apologies for the misunderstanding on my part!

wzzzrd86 commented 1 year ago

@hocanint-amzn I'd like to take a look at this, and think I have reproduced what you are talking about very simply.

Do you have an example config file to share?

This is my very basic recreation of the issue.

resource "aws_lakeformation_permissions" "<my test>" {
  principal   = "<my arn>"
  permissions = ["CREATE_TABLE", "ALTER", "DROP"]

 lf_tag_policy {
    resource_type = "DATABASE"

    expression {
      key    = "test"
      values = ["a"]
    }
    expression {
      key    = "test"
      values = ["b"]
    }
    expression {
      key    = "test"
      values = ["c"]
    }
    expression {
      key    = "test"
      values = ["d"]
    }
    expression {
      key    = "test"
      values = ["e"]
    }
    expression {
      key    = "test"
      values = ["f"]
    }
  }

Which produces the following

image
github-actions[bot] commented 1 year ago

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.