-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error when importing aws_glue_partition #38925
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Provider version is 5.63.0 |
We also see the same error when we just now try to plan an existing project
The aws_glue_partition code: resource "aws_glue_partition" "gold_findings_partitions" {
for_each = toset(local.findings_table_partitions)
database_name = aws_glue_catalog_database.gold.name
table_name = aws_glue_catalog_table.findings_gold.name
partition_values = ["${each.value}"]
storage_descriptor {
location = "s3://${module.s3_bucket_gold.name}/tables/${aws_glue_catalog_table.findings_gold.name}/resource_type=${each.value}"
input_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"
output_format = "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"
ser_de_info {
serialization_library = "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
}
parameters = {
"classification" = "Parquet"
"typeOfData" : "file"
"compressionType" : "snappy"
}
stored_as_sub_directories = false
}
} |
Furthermore, the docs for the aws_glue_partition resource don't show an additional location attribute nor will my TF validate if I add one 😩 https://registry.terraform.io/providers/-/aws/latest/docs/resources/glue_partition |
The partition resources are tainted due to this error:
|
Still receiving this error in AWS Provider v5.80.0:
|
Glue partition properties in AWS (redacted):
|
Facing the same error while creating a partition, the same input work fine while working with boto3 or the AWS CLI. AWS provider 5.83.1 The problem seems to originate in the fact that the flattenStorageDescriptor function (called by partition.go) returns a map containing a key named "additional_locations", yet in partition.go’s schema for storage_descriptor, there is no "additional_locations" field |
The same
|
Using
It looks like nikhil-goenka@bc86ca4#diff-5e4d893235d1f275a3d26ed5f4c5c22f4d2ef57dfbeb30bb29a4c6b15cca9121R915 modified the https://github.com/nikhil-goenka/terraform-provider-aws/blob/c428d2cb510d33fcb603d7e6e22d1370416f642a/internal/service/glue/partition.go#L267-L269 however, the I think this is thus a regression in #37891 -> terraform-provider-aws 5.55 that breaks all use of |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.88.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Terraform Core Version
1.9.3
AWS Provider Version
Affected Resource(s)
aws_glue_partition
When importing a partition the import throws an unexpected error
│ Error: setting storage_descriptor: Invalid address to set: []string{"storage_descriptor", "0", "additional_locations"}
Expected Behavior
Resource should be imported without this error
Actual Behavior
The resource is not imported and you get this error:
│ Error: setting storage_descriptor: Invalid address to set: []string{"storage_descriptor", "0", "additional_locations"}
Relevant Error/Panic Output Snippet
│ Error: setting storage_descriptor: Invalid address to set: []string{"storage_descriptor", "0", "additional_locations"}
Terraform Configuration Files
Steps to Reproduce
import.tf:
& the resource is not imported.
Here is the partition configuration:
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: