-
Notifications
You must be signed in to change notification settings - Fork 190
Cluster autoscaling #233
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
Cluster autoscaling #233
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.
A question on validation and a few changes/fixes to docs. Thanks!!
website/docs/r/cluster.html.markdown
Outdated
* `auto_scaling_compute_enabled` - (Optional) Specifies whether cluster tier auto-scaling is enabled. The default is false. | ||
- Set to `true` to enable cluster tier auto-scaling. If enabled, you must specify a value for `providerSettings.autoScaling.compute.maxInstanceSize`. | ||
- Set to `false` to disable cluster tier auto-scaling. | ||
* `auto_scaling_compute_scale_down_enabled` - (Optional) Set to `true` to enable the cluster tier to scale down. This option is only available if `autoScaling.compute.enabled` is `true`. | ||
- If this option is enabled, you must specify a value for `providerSettings.autoScaling.compute.minInstanceSize` |
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.
We need an important note in the doc that if auto_scaling_compute_enabled then Atlas will automatically scale up to the maximum provided and down to the minimum, if provided. This will cause the value of instanceSizeName returned to potential be different than what is specified in the Terraform config and if one then applies a plan, not noting this, Terraform will scale the cluster back down to the original instanceSizeName value. To prevent this a lifecycle customization should be used, i.e.:
lifecycle {
ignore_changes = instanceSizeName
}
We should also test that a lifecycle customization works as expected, thought that will be tough to auto trigger a scaling event so one could test manually by running a terraform config, change the instance size in the UI to between the autoscale values and see if the lifecycle customerization works properly.
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 pushed with note important about lifecycle and added a similar situation,its test, thank you so much, melissa !
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.
Thank you so much for the quick turnaround on the last review! One more small doc adjustment. I also provided some information about how to potentially really test this add and the lifecycle changes - I hope it is helpful.
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.
LGTM - just needs a DoU review and we should be good!
… change of instanceSizeName
…t note about lifecycle situation in resource cluster
c064f58
to
8613cdc
Compare
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.
LGTM!
Added new fields for cluster about autoscaling
auto_scaling_compute_enabled
auto_scaling_compute_scale_down_enabled
provider_auto_scaling_compute_min_instance_size
provider_auto_scaling_compute_max_instance_size
Added a testacc for cluster using autoscaling