Skip to content
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

fix: Update deprecated "resolve_conflicts" attribute in Terraform code #1659

Closed
wants to merge 2 commits into from

Conversation

rayl15
Copy link

@rayl15 rayl15 commented Jun 21, 2023

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?

  • [*] Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

Additional 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.
Screenshot 2023-06-21 at 1 28 43 PM

bryantbiggs and others added 2 commits June 5, 2023 17:08
…l resource creation

The old behavior of this attribute was to allow you to set it to PRESERVE on initial resource creation. This would cause any existing addon configuration to be preserved, even if the configuration that you were trying to create conflicted with the existing configuration.
@rayl15 rayl15 requested a review from a team as a code owner June 21, 2023 07:59
@rayl15 rayl15 had a problem deploying to EKS Blueprints Test June 21, 2023 07:59 — with GitHub Actions Failure
@rayl15 rayl15 changed the title Fix: Update deprecated "resolve_conflicts" attribute in Terraform code fix: Update deprecated "resolve_conflicts" attribute in Terraform code Jun 21, 2023
@rayl15
Copy link
Author

rayl15 commented Jun 21, 2023

Need to check the conflicting change.

@rayl15 rayl15 closed this Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants