-
-
Notifications
You must be signed in to change notification settings - Fork 235
Added AutoTune support #149
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
Conversation
|
/test all |
variables.tf
Outdated
| default = null | ||
| } | ||
|
|
||
| variable "auto_tune_cron_schedule" { |
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.
@dm3ch
pls add here the default value; otherwise, this is a required variable.
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.
These values are not used by default (if auto_tune_enabled = false), so requiring them is not a best option.
And there's no default value in provider as far as I remember.
So I see 2 possible options how it can be done:
- Add some default value, which we would think optimal
- Try to add a validation rule that would check if
auto_tune_enabled = trueand require variable in this case
What do you think would be better?
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.
As far as I remember validation condition can't refer to other vars, so the second option is impossible. :(
So to be honest I don't know how to better workaround this. Do you have any thoughts?
variables.tf
Outdated
| description = "A cron expression specifying the recurrence pattern for an Auto-Tune maintenance schedule." | ||
| } | ||
|
|
||
| variable "auto_tune_duration" { |
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.
@dm3ch
pls add here the default value; otherwise, this is a required variable.
Co-authored-by: Igor Rodionov <goruha@gmail.com>
Co-authored-by: Igor Rodionov <goruha@gmail.com>
|
/test all |
Co-authored-by: Igor Rodionov <goruha@gmail.com>
|
@goruha Reworked input variable for auto tune to an object to be able to validate values if auto tune is enabled to not add default values (cause provider doesn't have default values for that). Could you please re-review? |
|
/test all |
|
tests still failed First reason - terraform lint The second reason - is, please, rebase the latest changes from the |
1316c5b to
039b898
Compare
|
Seems to be done. But haven't try to run terraform lint locally |
|
/test all |
|
Tests failed Gime 5 minutes I will suggest fixes |
|
@dm3ch check my suggestions |
Co-authored-by: Igor Rodionov <goruha@gmail.com>
|
@goruha Yep, TY, missed it. |
Co-authored-by: Igor Rodionov <goruha@gmail.com>
|
One more tests run? Let's hope it would be final. |
|
/test all |
|
@dm3ch LGTM |
* Added AutoTune support * Auto Format * Update variables.tf Co-authored-by: Igor Rodionov <goruha@gmail.com> * Update variables.tf Co-authored-by: Igor Rodionov <goruha@gmail.com> * Update variables.tf Co-authored-by: Igor Rodionov <goruha@gmail.com> * Auto Format * Rework auto_tune variables to single object * Try to fix variables.tf lint * Auto Format * Update variables.tf Co-authored-by: Igor Rodionov <goruha@gmail.com> * Update variables.tf Co-authored-by: Igor Rodionov <goruha@gmail.com> --------- Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> Co-authored-by: Igor Rodionov <goruha@gmail.com> (cherry picked from commit 7f83b65)
what
why
references