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.85k stars 9.19k forks source link

[Enhancement] Data filtering and cell-level security in Lake Formation #26687

Open be-rock opened 2 years ago

be-rock commented 2 years ago

Community Note

Description

Requesting a new permission type to be added to aws_lakeformation_permissions to support what AWS describes as Data filtering and cell-level security in Lake Formation

New or Affected Resource(s)

aws_lakeformation_permissions

Potential Terraform Configuration

# row_filter
resource "aws_lakeformation_permissions" "my_lf_perms" {
    permissions = ["SELECT"]
    principal   = "arn:aws:iam::${data.aws_caller_identity.current.id}:role/my_lf_user"

  data_cells_filter {
    database_name = aws_glue_catalog_table.example1.database_name
    table_name    = aws_glue_catalog_table.example1.name
    column_names  = ["col1", "col2"]
    name          = "name-of-data-cells-filter"
    row_filter {
      filter_expression = "a-partiql-predicate"
    }
  }
}

References

None in addition to what's been shared above

be-rock commented 1 year ago

Related https://github.com/hashicorp/terraform-provider-aws/issues/27677