-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Make instances
optional since the API doesn't require this parameter.
#17836
Conversation
If we leave this parameter `nil` in creation, the API will respond `0` when we read, so I add a default value to this argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @lonegunmanb, LGTM 🥮
Thank you for addressing this. If "instances" is not set, it defaults to 0. Will pluginsdk.ResourceData.HasChange("instances") return false in this case when checking the diff between "state" and "diff"? |
Hi @hui-dai , no diff will be addressed in the plan, the acc test will apply a config file without setting |
This functionality has been released in v3.17.0 of the Terraform 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! |
This PR does indeed make the instance parameter optional but it does not appear to have addressed the intent of the request in #17821, which is not to change the number of existing instances during an update action. The semantics for not setting By defaulting to 0, instead of null, this will resize VMSS down to 0 if the |
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 contributions. |
Make
instances
optional since the API doesn't require this parameter.If we leave this parameter
nil
in creation, the API will respond0
when we read, so I add a default value to this argument.This pr will fix #17821 .
The new added acc test:
=== RUN TestAccLinuxVirtualMachineScaleSet_defaultInstanceCount
=== PAUSE TestAccLinuxVirtualMachineScaleSet_defaultInstanceCount
=== CONT TestAccLinuxVirtualMachineScaleSet_defaultInstanceCount
--- PASS: TestAccLinuxVirtualMachineScaleSet_defaultInstanceCount (306.18s)
PASS