account-quotas
This component is responsible for requesting service quota increases. We recommend making requests here rather than in
account-settings
because account-settings
is a restricted component that can only be applied by SuperAdmin.
Usage
Stack Level: Global and Regional (depending on quota)
Global resources must be provisioned in us-east-1
. Put them in the gbl
stack, but set region: us-east-1
in the
vars
section.
You can refer to services either by their exact full name (e.g.
service_name: "Amazon Elastic Compute Cloud (Amazon EC2)"
) or by the service code (e.g. service_code: "ec2"
).
Similarly, you can refer to quota names either by their exact full name (e.g. quota_name: "EC2-VPC Elastic IPs"
) or by
the quota code (e.g. quota_code: "L-0263D0A3"
).
You can find service codes and full names via the AWS CLI (be sure to use the correct region):
aws --region us-east-1 service-quotas list-services
You can find quota codes and full names, and also whether the quotas are adjustable or global, via the AWS CLI, but you will need the service code from the previous step:
aws --region us-east-1 service-quotas list-service-quotas --service-code ec2
If you make a request to raise a quota, the output will show the requested value as value
while the request is
pending.
Special usage Notes
Even though the Terraform will submit the support request, you may need to follow up with AWS support to get the request approved, via the AWS console or email.
Resources are destroyed on change
Because the AWS API often returns default values rather than configured or applicable values for a given quota, we have to ignore the value returned by the API or else face perpetual drift. To allow us to change the value in the future, even though we are ignoring it, we encode the value in the resource key, so that a change of value will result in a new resource being created and the old one being destroyed. Destroying the old resource has no actual effect (it does not even close an open request), so it is safe to do.
Example
Here's an example snippet for how to use this component.
components:
terraform:
account-quotas:
vars:
quotas:
vpcs-per-region:
service_code: vpc
quota_name: "VPCs per Region"
value: 10
vpc-elastic-ips:
service_code: ec2
quota_name: "EC2-VPC Elastic IPs"
value: 10