fix: Update deprecated "resolve_conflicts" attribute in Terraform code #1659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the Terraform code in the main.tf file within the aws-ebs-csi-driver module. The deprecated "resolve_conflicts" attribute has been replaced with the new "resolve_conflicts_on_update" attribute, which align with the recommended practices provided by Terraform.
Changes made:
Replaced resolve_conflicts with resolve_conflicts_on_update attributes.
Updated default value to "OVERWRITE" as fallback, but this can be customized through the addon_config variable.
Motivation and Context
This PR addresses a deprecation warning in our Terraform code related to the use of the "resolve_conflicts" attribute. The deprecation warning advises us to replace it with the recommended "resolve_conflicts_on_update" and or/ resolve_conflicts_on_create attributes. By updating our code, we ensure compatibility with the latest Terraform versions, leverage improved behavior, and maintain supportability.
How was this change tested?
pre-commit run -a
with this PRAdditional Notes
To ensure the correctness of these changes, I have tested the updated code against a local Terraform environment, including the affected resource. I have also reviewed the Terraform documentation and confirmed that the new attributes are the recommended approach for resolving conflicts during resource creation and updates. Attached screenshot of local testing.