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

Updated quota handling #13

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ npk/terraform$ terraform destroy
# If you're configured to selfhost, you'll need to remove that as well.
npk/terraform-selfhost$ terraform destroy

npk/terraform$ git checkout api_rewrite
npk/terraform$ git pull
npk/terraform$ vim npk-settings.json # Edit the settings to conform with the new format.
npk/terraform$ ./deploy.sh
```
Expand Down
10 changes: 1 addition & 9 deletions terraform/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,18 +170,10 @@ if [[ ! -f quotas.json ]]; then
PQUOTA=$(aws service-quotas list-service-quotas --service-code ec2 | jq '.Quotas[] | select(.QuotaCode == "L-7212CCBC") | .Value')
GQUOTA=$(aws service-quotas list-service-quotas --service-code ec2 | jq '.Quotas[] | select(.QuotaCode == "L-3819A6DF") | .Value')

if [[ $PQUOTA -eq 0 ]]; then
PQUOTA=384
fi

if [[ $GQUOTA -eq 0 ]]; then
GQUOTA=384
fi

QUOTAERR=0
if [[ $PQUOTA -lt 16 ]]; then
QUOTAERR=1
echo "The target account is limited to fewer than 384 vCPUs in us-west-2 for P-type instances."
echo "The target account is limited to fewer than 16 vCPUs in us-west-2 for P-type instances."
echo "-> Current limit: $PQUOTA"
echo ""
fi
Expand Down