-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Add compaction options to to r/aws_glue_catalog_table_optimizer #44044
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
base: main
Are you sure you want to change the base?
Add compaction options to to r/aws_glue_catalog_table_optimizer #44044
Conversation
Adds `compaction_configuration` as a configurable block for Glue Table optimizers. This change also makes it mandatory for optimizers with `type = compaction`, which may break some existing configurations. This also adds validation rules so that optimizer configuration blocks must match the type of optimizer. The reason for making `compaction_configuration` mandatory is that the Glue API now always returns a `CompactionConfiguration` block with strategy set to `binpack` if no options are passed upon creation. If `compaction_configuration` is optional and missing, this results in an entire block that is absent from Terraform configuration but gets returned in state. This cannot be overcome with a PlanModifier because the diff affects the block count (0 vs. 1) The most reliable way to prevent the Terraform config from conflicting with the API response seems to be mandating that the fields always present in the response are always present in the config.
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
|
I opened this PR from an organization account. Please let me know if I can make requested changes here or if I should move this PR to allow maintainer edits as described above |
+1 for this, as we are also needing this functionality |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
No changes to security controls
Description
Adds
compaction_configuration
as a configurable block for Glue Table optimizers.This change also makes it mandatory for optimizers with
type = compaction
, which may break some existing configurations. This also adds validation rules so that optimizer configuration blocks must match the type of optimizer.The reason for making
compaction_configuration
mandatory is that the Glue API now always returns aCompactionConfiguration
block with strategy set tobinpack
if no options are passed upon creation. Ifcompaction_configuration
is optional and missing, this results in an entire block that is absent from Terraform configuration but gets returned in state. This cannot be overcome with a PlanModifier because the diff affects the block count (0 vs. 1)The most reliable way to prevent the Terraform config from conflicting with the API response seems to be mandating that the fields always present in the response are always present in the config.
Relations
Closes #43867
References
Output from Acceptance Testing
Note: The full test suite with 6 optimizer tests seems to have one test fail 2 out of 3 times with a 403 response from the Glue API. I don't know if this is a major concern or a known issue with the Glue API.