Open Liangtian-hcp opened 2 years ago
We do not currently send empty objects over to Cloud Control: https://github.com/hashicorp/terraform-provider-awscc/blob/8fc6356e37ce21e2a4acd1d4576d7017ded5e23a/internal/generic/translate.go#L168-L170.
That functionality has been there from the start. There may be issues with diffs if we remove this.
This seems to be a persistent problem if users want to use column_wildcard with no excluded columns. ie specifying:
"column_wildcard": {},
fails with:
│ Waiting for Cloud Control API service CreateResource operation completion │ returned: waiter state transitioned to FAILED. StatusMessage: Data cells │ filter must have column names or column wildcard
because tf awscc fails to include the column_wildcard argument.
We are also facing a similar failures when using awscc provider. In our use case, we need to create data cells filters to exclude certain rows. However, we need all columns in the rows that qualify for the filter expression to be included. We can achieve this by using aws lakeformation create-data-cells-filter command and passing it the following: { "TableCatalogId": "\<aws account>", "DatabaseName": "\<database name>", "TableName": "\<table name>", "Name": "\<data filter name>", "RowFilter": { "FilterExpression": "\<expression>" }, "ColumnNames": [], "ColumnWildcard": { "ExcludedColumnNames": [] } }
However, we are not able to achieve the same results using awscc provider due to the following error: Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Data cells filter must have column names or column wildcard
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Affected Resource(s)
*awscc_lakeformation_data_cells_filter
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
create resource emp-edu-filter-all
Actual Behavior
return Error: AWS SDK Go Service Operation Incomplete with awscc_lakeformation_data_cells_filter.emp-edu-filter-all on test-mdm-common-lakeformation.tf line 114, in resource "awscc_lakeformation_data_cells_filter" "emp-edu-filter-all": resource "awscc_lakeformation_data_cells_filter" "emp-edu-filter-all" { Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Data cells filter must have column names or column wildcard (Service: LakeFormation, Status Code: 400, Request ID: 8e6279a4-5b51-4330-a6a0-12312312). ErrorCode: InvalidRequest
Steps to Reproduce
terraform apply
Important Factoids
I checked the cloudtrail logs ,I got this error message:
References
0000