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: Added all instance refresh options, including scale in protection and standby instances #243

Conversation

mickmorse
Copy link

Description

Not all preferences were available in the instance_refresh map. I've added the rest of them in.

Motivation and Context

I was getting the below error when using the module:

ValidationError: 2 validation errors detected: Value '' at 'preferences.scaleInProtectedInstances' failed to satisfy constraint: Member must satisfy enum value set: [Ignore, Wait, Refresh]; Value '' at 'preferences.standbyInstances' failed to satisfy constraint: Member must satisfy enum value set: [Terminate, Ignore, Wait]

Breaking Changes

Since all parameters are optional. There are no breaking changes

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@mickmorse mickmorse changed the title Added all instance refresh options, including scale in protection and standby instances fix: Added all instance refresh options, including scale in protection and standby instances Sep 8, 2023
@jseiser
Copy link

jseiser commented Sep 8, 2023

We are also hitting this error now.

I assume the issue is coming in from the new AWS provider: hashicorp/terraform-provider-aws#33310

@adiospeds
Copy link

Thanks for the PR - We hit the same issue:

Value '' at 'preferences.scaleInProtectedInstances' failed to satisfy constraint: Member must satisfy enum value set: [Ignore, Wait, Refresh]; 
Value '' at 'preferences.standbyInstances' failed to satisfy constraint: Member must satisfy enum value set: [Terminate, Ignore, Wait]

One thing I'd like to bring to notice is the documentation for scale_in_protected_instances and standby_instances says Default values as Wait, so those should also get Updated if this PR is approved, or set the value in this PR from Ignore to Wait

@bryantbiggs
Copy link
Member

Please open an issue on the AWS provider - this sounds like a bug for the provider

@mhowell-ims
Copy link

mhowell-ims commented Sep 8, 2023

I've opened hashicorp/terraform-provider-aws#33377 .

You can avoid this bug by downgrading your AWS provider to 5.15.0.

@mhowell-ims
Copy link

There is already a PR for the bug in the AWS provider. Consider upvoting it. hashicorp/terraform-provider-aws#33382

@mickmorse
Copy link
Author

Thanks for the PR - We hit the same issue:

Value '' at 'preferences.scaleInProtectedInstances' failed to satisfy constraint: Member must satisfy enum value set: [Ignore, Wait, Refresh]; 
Value '' at 'preferences.standbyInstances' failed to satisfy constraint: Member must satisfy enum value set: [Terminate, Ignore, Wait]

One thing I'd like to bring to notice is the documentation for scale_in_protected_instances and standby_instances says Default values as Wait, so those should also get Updated if this PR is approved, or set the value in this PR from Ignore to Wait

This is done. Thanks for your input.

@bryantbiggs
Copy link
Member

this should be resolved now with https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.16.2

@mickmorse
Copy link
Author

mickmorse commented Sep 13, 2023

this should be resolved now with https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.16.2

Well no because not all options are available in the instance refresh block. This PR was to make them available regardless of the bug.

@bryantbiggs
Copy link
Member

that will require v5.x of the AWS provider and therefore a breaking change - this will be handled in #240

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants