-
Notifications
You must be signed in to change notification settings - Fork 89
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
Provide a default for the autoscaling min/max resource #477
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template
mieciu
reviewed
Apr 28, 2022
@@ -260,6 +239,33 @@ func expandEsTopology(raw interface{}, topologies []*models.ElasticsearchCluster | |||
return res, nil | |||
} | |||
|
|||
func expandAutoscalingDimension(autoscale map[string]interface{}, model *models.TopologySize, dimension string) error { |
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 might be worth placing a short comment on why we need this method
mieciu
approved these changes
Apr 28, 2022
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.
Minor nit about the comment, but that's definitely good to go as it is 👍
tobio
added a commit
that referenced
this pull request
May 10, 2022
* Provide a default for the autoscaling min/max resource This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template * PR feedback
tobio
added a commit
that referenced
this pull request
May 10, 2022
* Provide a default for the autoscaling min/max resource This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template * PR feedback
tobio
added a commit
that referenced
this pull request
May 10, 2022
* feat: 429 add debug mode (#430) * feat: 429 add debug mode * clean up * Add const comment * fix: make build gcflags issue * fix(deps): update module github.com/stretchr/testify to v1.7.1 (#456) Co-authored-by: Renovate Bot <[email protected]> * chore(deps): update actions/checkout action to v3 (#451) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * chore(deps): update endbug/add-and-commit action to v9 (#454) Co-authored-by: Renovate Bot <[email protected]> * chore(deps): update actions/setup-go action to v3 (#448) Co-authored-by: Renovate Bot <[email protected]> * fix(deps): update module github.com/go-openapi/runtime to v0.23.2 (#452) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * chore(deps): update actions/cache action to v3 (#458) Co-authored-by: Renovate Bot <[email protected]> * chore(deps): update peterjgrainger/action-create-branch action to v2.2.0 (#461) Co-authored-by: Renovate Bot <[email protected]> * chore(deps): update hashicorp/setup-terraform action to v2 (#470) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * Include a note in the import docs mentioning that the credentials will not be available. (#464) * fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.11.0 (#453) * fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.11.0 * Move debug mode to ServeOpts Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Toby Brain <[email protected]> * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * Allow zero sized topology elements when autoscaling is enabled (#472) * Allow zero sized topology elements when autoscaling is enabled * Fix acceptance test * fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.14.0 (#475) Co-authored-by: Renovate Bot <[email protected]> * Provide a default for the autoscaling min/max resource (#477) * Provide a default for the autoscaling min/max resource This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template * PR feedback * fix(deps): update module github.com/elastic/cloud-sdk-go to v1.9.0 (#480) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * fix(deps): update module github.com/go-openapi/runtime to v0.24.0 (#457) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * Update CHANGELOG.md and NOTICE * fix(deps): update module github.com/hashicorp/terraform-plugin-sdk/v2 to v2.15.0 (#481) Co-authored-by: Renovate Bot <[email protected]> * Update CHANGELOG.md and NOTICE * Fixes arguments for add-and-commit (#479) * Fixes arguments for add-and-commit These were changed in v8. https://github.com/EndBug/add-and-commit/blob/main/CHANGELOG.md#800---2022-01-20 * Change branch property on the minor bump. * Fetch full repo history when checking out. make minor inspects the current git tags before bumping. Without fetching those tags, the task fails. * Add changelog * Download the Terraform CLI for acceptance tests This should be temporary, the automated download is currently failing due to an unexpected content-type on the response Co-authored-by: luigibk <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: elasticcloudclients <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes an issue when specifying an autoscaling min/max when there is no corresponding min/max defined in the deployment template.
We're unable to specify a default in the Terraform schema since the resource attributes are
Computed
. Instead we define a default in code.Related Issues
Fixes #401
Motivation and Context
How Has This Been Tested?
Unit tests
Manually with:
Types of Changes
Readiness Checklist