Terraform resource for managing an AWS Lake Formation Data Cells Filter.
resource "aws_lakeformation_data_cells_filter" "example" {
table_data {
database_name = aws_glue_catalog_database.test.name
name = "example"
table_catalog_id = data.aws_caller_identity.current.account_id
table_name = aws_glue_catalog_table.test.name
column_names = ["my_column"]
row_filter {
filter_expression = "my_column='example'"
}
}
}
The following arguments are required:
table_data
- (Required) Information about the data cells filter. See Table Data below for details.database_name
- (Required) The name of the database.name
- (Required) The name of the data cells filter.table_catalog_id
- (Required) The ID of the Data Catalog.table_name
- (Required) The name of the table.column_names
- (Optional) A list of column names and/or nested column attributes.column_wildcard
- (Optional) A wildcard with exclusions. See Column Wildcard below for details.row_filter
- (Optional) A PartiQL predicate. See Row Filter below for details.version_id
- (Optional) ID of the data cells filter version.This resource exports the following attributes in addition to the arguments above:
id
- Provider composed identifier: database_name,name,table_catalog_id,table_name
.excluded_column_names
- (Optional) Excludes column names. Any column with this name will be excluded.all_rows_wildcard
- (Optional) A wildcard that matches all rows.filter_expression
- (Optional) A filter expression.create
- (Default 2m
)In Terraform v1.5.0 and later, use an import
block to import Lake Formation Data Cells Filter using the example_id_arg
. For example:
import {
to = aws_lakeformation_data_cells_filter.example
id = "database_name,name,table_catalog_id,table_name"
}
Using terraform import
, import Lake Formation Data Cells Filter using the id
. For example:
% terraform import aws_lakeformation_data_cells_filter.example database_name,name,table_catalog_id,table_name