Skip to main content

Module: service-quotas

Terraform module to manage AWS Service Quotas.

Usage

For a complete example, see examples/complete.

For automated tests of the complete example using bats and Terratest (which tests and deploys the example on AWS), see test.

NOTE: Some service quotas can only be managed from specific regions (see hashicorp/terraform-provider-aws#13075)

# Create a standard label resource. See [null-label](https://github.com/cloudposse/terraform-null-label/#terraform-null-label--)
module "label" {
source = "cloudposse/label/null"
# Cloud Posse recommends pinning every module to a specific version, though usually you want to use the current one
# version = "x.x.x"

namespace = "eg"
name = "example"
}

locals {
service_quotas = [
{
quota_code = "L-93826ACB" # aka `Routes per route table`
service_code = "vpc"
value = 100 # since this is non-null, the module should try to create a service quota for this value
},
{
quota_name = "Subnets per VPC" # aka `L-44499CD2`
service_code = "vpc"
value = 250 # since this is non-null, the module will find the `quota_code` and try to create a service quota for this value
},
{
quota_code = "L-F678F1CE" # aka `VPC per Region`
service_code = "vpc"
value = null # since this is null, the module should try to lookup the value of this service quota, it should be default
},
{
quota_name = "VPC security groups per Region" # aka `L-E79EC296`
service_code = "vpc"
value = null # since this is null, the module should try to lookup the value of this service quota, it should be default
}
]
}

module "service_quotas" {
source = "cloudposse/service-quotas/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"

service_quotas = local.service_quotas

context = module.label.this
}

Examples

Here is an example of using this module: