Skip to content
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

aws - quotas - fix request-increase #8939

Merged
merged 1 commit into from Sep 14, 2023

Conversation

StevenGunn
Copy link
Contributor

Currently, we can request limit increases for service quotas:

resource: service-quota
filters:
  - UsageMetric: present
  - type: usage-metric
actions:
  - type: request-increase
    multiplier: 1.4

However, we encountered the following error when a quota's current limit times its desired multiplier value gives the same as its current limit when rounded down:

IllegalArgumentException: An error occurred (IllegalArgumentException) when calling the RequestServiceQuotaIncrease operation: You must provide a quota value greater than the current quota value

For example, if the current limit is 1, and the usage is 100%, then 1 times 1.4 rounded down still equals 1 (instead of desired next integer 2).

This fixes the logic by instead rounding up the requested limit increase to the nearest integer.

@StevenGunn StevenGunn marked this pull request as ready for review September 13, 2023 00:11
@StevenGunn StevenGunn changed the title aws - quotas - request-increase fix aws - quotas - fix request-increase Sep 13, 2023
Copy link
Collaborator

@kentnsw kentnsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes totally sense to me. Thanks @StevenGunn
Let's wait a bit longer before merging to see if anyone got any concerns.

Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks

@kapilt kapilt merged commit 69f8ab9 into cloud-custodian:main Sep 14, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants