-
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
VMSS - add feature for scale_in_on_delete #13635
VMSS - add feature for scale_in_on_delete #13635
Conversation
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.
hey @hbuckle
Thanks for this PR - taking a look through this mostly LGTM, however I think we want to rename this to scale_to_zero_before_deletion
so it's clearer exactly what this does - WDYT?
Thanks!
internal/features/defaults.go
Outdated
@@ -33,6 +33,7 @@ func Default() UserFeatures { | |||
VirtualMachineScaleSet: VirtualMachineScaleSetFeatures{ | |||
ForceDelete: false, | |||
RollInstancesWhenRequired: true, | |||
ScaleInOnDelete: true, |
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.
I think it'd be worth calling this ScaleToZeroOnDelete
rather than ScaleIn
so it's a little more explicit?
internal/provider/features_test.go
Outdated
"virtual_machine_scale_set": []interface{}{ | ||
map[string]interface{}{ | ||
"force_delete": false, | ||
"scale_in_on_delete": false, |
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.
doesn't this also require RollInstancesWhenRequired
set?
@@ -136,6 +136,10 @@ func schemaFeatures(supportLegacyTestSuite bool) *pluginsdk.Schema { | |||
Type: pluginsdk.TypeBool, | |||
Required: true, |
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.
outside of the scope of this PR, but I'm surprised that this is required - this should be Optional
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.
Something else I noticed is that force_delete doesn't appear to actually be implemented
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 @hbuckle, LGTM!
This functionality has been released in v2.83.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! |
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. |
Not done anything to do with features before, hopefully this is ok.
Fixes #13569