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

Support Managing Service Quotas #9118

Closed
bflad opened this issue Jun 25, 2019 · 3 comments · Fixed by #9192
Closed

Support Managing Service Quotas #9118

bflad opened this issue Jun 25, 2019 · 3 comments · Fixed by #9192
Assignees
Labels
new-resource Introduces a new resource. service/servicequotas Issues and PRs that pertain to the servicequotas service.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Jun 25, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The new Service Quotas service provides a simplified method for requesting quota (limit) increases. Theoretically, Terraform can support this as a resource by submitting the request via the new API and reading back either request values and/or current service quotas (seems preferable!).

A separate feature request is created for managing Service Quotas Quota Request Templates and their associations for Organizations: #9119

New Resource(s)

  • aws_servicequotas_service_quota
  • aws_servicequotas_service_quota_increase_request

Potential Terraform Configuration

Option 1: Increase request managing resource

Simply submits quota increases. No lifecycle management for service quotas if they are increased in the future.

# Relevant API Calls:
#   GetRequestedServiceQuotaChange
#   RequestServiceQuotaIncrease
resource "aws_servicequotas_service_quota_increase_request" "example" {
  desired_value = 123   # TypeFloat, Required, ForceNew
  quota_code    = "..." # TypeString, Required, ForceNew
  service_code  = "..." # TypeString, Required, ForceNew
}

Option 2: Service quota managing resource

Manages lifecycle of service quota. Requests quota increase if new value is greater than current value. Value is based on desired value of quota increase request if pending or case opened state, otherwise based on current service quota.

# Relevant API Calls:
#   GetRequestedServiceQuotaChange
#   GetServiceQuota
#   RequestServiceQuotaIncrease
# Additional attributes:
#   request_id # TypeString, Computed
#   request_status # TypeString, Computed
resource "aws_servicequotas_service_quota" "example" {
  quota_code    = "..." # TypeString, Required, ForceNew
  service_code  = "..." # TypeString, Required, ForceNew
  value         = 123   # TypeFloat, Required
}

References

@bflad bflad added new-resource Introduces a new resource. service/servicequotas Issues and PRs that pertain to the servicequotas service. labels Jun 25, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 25, 2019
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Jun 25, 2019
bflad added a commit that referenced this issue Jun 25, 2019
Reference: #9118

Output from acceptance testing in AWS Commercial:

```
--- PASS: TestAccAwsServiceQuotasServiceQuota_basic (14.35s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- SKIP: TestAccAwsServiceQuotasServiceQuota_basic (2.51s)
    resource_aws_servicequotas_service_quota_test.go:138: skipping acceptance testing: RequestError: send request failed
        caused by: Post https://servicequotas.us-gov-west-1.amazonaws.com/: dial tcp: lookup servicequotas.us-gov-west-1.amazonaws.com: no such host
```
@bflad
Copy link
Contributor Author

bflad commented Jun 25, 2019

Draft implementation of option 2 submitted: #9121 #9192

@bflad bflad self-assigned this Jun 25, 2019
bflad added a commit that referenced this issue Jul 1, 2019
Reference: #9118

Output from acceptance testing (requesting increase of t3.nano and t3.micro limits in testing account):

```
export SERVICEQUOTAS_INCREASE_ON_CREATE_QUOTA_CODE=L-55EB784E
export SERVICEQUOTAS_INCREASE_ON_CREATE_SERVICE_CODE=ec2
export SERVICEQUOTAS_INCREASE_ON_CREATE_VALUE=25
export SERVICEQUOTAS_INCREASE_ON_UPDATE_QUOTA_CODE=L-0F0ED007
export SERVICEQUOTAS_INCREASE_ON_UPDATE_SERVICE_CODE=ec2
export SERVICEQUOTAS_INCREASE_ON_UPDATE_VALUE=25

--- PASS: TestAccAwsServiceQuotasServiceQuota_basic (13.83s)
--- PASS: TestAccAwsServiceQuotasServiceQuota_Value_IncreaseOnCreate (12.52s)
--- PASS: TestAccAwsServiceQuotasServiceQuota_Value_IncreaseOnUpdate (20.00s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- SKIP: TestAccAwsServiceQuotasServiceQuota_basic (2.51s)
    resource_aws_servicequotas_service_quota_test.go:138: skipping acceptance testing: RequestError: send request failed
        caused by: Post https://servicequotas.us-gov-west-1.amazonaws.com/: dial tcp: lookup servicequotas.us-gov-west-1.amazonaws.com: no such host
```
bflad added a commit that referenced this issue Jul 1, 2019
Reference: #9118

Output from acceptance testing (requesting increase of t3.nano and t3.micro limits in testing account):

```
export SERVICEQUOTAS_INCREASE_ON_CREATE_QUOTA_CODE=L-55EB784E
export SERVICEQUOTAS_INCREASE_ON_CREATE_SERVICE_CODE=ec2
export SERVICEQUOTAS_INCREASE_ON_CREATE_VALUE=25
export SERVICEQUOTAS_INCREASE_ON_UPDATE_QUOTA_CODE=L-0F0ED007
export SERVICEQUOTAS_INCREASE_ON_UPDATE_SERVICE_CODE=ec2
export SERVICEQUOTAS_INCREASE_ON_UPDATE_VALUE=25

--- PASS: TestAccAwsServiceQuotasServiceQuota_basic (13.83s)
--- PASS: TestAccAwsServiceQuotasServiceQuota_Value_IncreaseOnCreate (12.52s)
--- PASS: TestAccAwsServiceQuotasServiceQuota_Value_IncreaseOnUpdate (20.00s)
```

Output from acceptance testing in AWS GovCloud (US):

```
--- SKIP: TestAccAwsServiceQuotasServiceQuota_basic (2.51s)
    resource_aws_servicequotas_service_quota_test.go:138: skipping acceptance testing: RequestError: send request failed
        caused by: Post https://servicequotas.us-gov-west-1.amazonaws.com/: dial tcp: lookup servicequotas.us-gov-west-1.amazonaws.com: no such host
```
@bflad bflad added this to the v2.20.0 milestone Jul 16, 2019
@bflad
Copy link
Contributor Author

bflad commented Jul 16, 2019

The new aws_servicequotas_service_quota resource has been merged and will release with version 2.20.0 of the Terraform AWS Provider, later this week. 🎉

@ghost
Copy link

ghost commented Nov 2, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/servicequotas Issues and PRs that pertain to the servicequotas service.
Projects
None yet
1 participant