Skip to content

Autoscaler maxreplicas fix #18607

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

modular-magician
Copy link
Collaborator

This PR removes unnecessary requirements reported in #18332.

This was an inconsistency, since in both terraform registry and Google Cloud documentation it's not specified that the value cannot be 0.

Google Cloud API gives you ability to create Autoscaler or Regional Autoscaler which have both minReplicas and maxReplicas set to 0. I've created one in Google Cloud Console and it worked just fine.

For the reported issue , I checked and request was missing max_num_replica field. For both zonal and regional autoscaler resources, I checked and min_num_replica field has send_empty_value set, while max_num_replica field doesn't. If we read the documentation of send_empty_value, this is the reason why max_num_replica was omitted entirely from the API request, when it was set to 0.

Fixes #18332

compute: fixed a bug preventing the creation of `google_compute_autoscaler` and `google_compute_region_autoscaler` resources if both `maxReplicas` and `minReplicas` were configured as zero.

Derived from GoogleCloudPlatform/magic-modules#11083

[upstream:86415d0d14a3c2a62bffdb7c6e8348f0fbf1c977]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit 3972398 into hashicorp:main Jun 28, 2024
4 checks passed
Copy link

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 issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2024
@modular-magician modular-magician deleted the downstream-pr-86415d0d14a3c2a62bffdb7c6e8348f0fbf1c977 branch November 17, 2024 00:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_compute_autoscaler update error
1 participant