# Can't create multiple resources using modules

**URL:** <https://discuss.hashicorp.com/t/cant-create-multiple-resources-using-modules/27931>\
**Category:** Azure\
**Created:** [August 7, 2021, 2:14am UTC](https://discuss.hashicorp.com/t/cant-create-multiple-resources-using-modules/27931 "2021-08-07T02:14:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dracozero7](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/dracozero7/32/21395_2.png) [@dracozero7](https://discuss.hashicorp.com/u/dracozero7)\
**Post date:** [August 7, 2021, 2:14am UTC](https://discuss.hashicorp.com/t/cant-create-multiple-resources-using-modules/27931/1 "2021-08-07T02:14:57Z")

</div>

Hello, need some help, I need to create multiple VMs using Azure Devops Pipelines. The pipeline works when creating one single or multiple when defining all the parameters in a single file. But I need to create dozens, so I created 2 modules, one for the windows VMs and one for the SQL VMs.

As a test I’m trying to create 2 for each module but when the main file runs It creates 1 VM for each module, but the second fail with this error message:

Error creating Windows Virtual Machine “vm02” (Resource Group “TerraformTestRG”): compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 – Original Error: autorest/azure: Service returned an error. Status= Code=“OperationNotAllowed” Message="Operation could not be completed as it results in exceeding approved standardDSv3Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 10, Current Usage: 8, Additional Required: 4, (Minimum) New Limit Required: 12. Submit a request for Quota increase at [Microsoft Azure](https://aka.ms/ProdportalCRP/?#create/Microsoft.Support/Parameters/%7B%22subId%22:%223c005fc9-2ae5-4c5d-ac1d-052969313e59%22,%22pesId%22:%2206bfd9d3-516b-d5c6-5802-169c800dec89%22,%22supportTopicId%22:%22e12e3d1d-7fa0-af33-c6d0-3c50df9658a3%22%7D) by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at [https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests."e](https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests.%22e)[0m

2021-08-07T02:08:09.8337109Z

2021-08-07T02:08:09.8338070Z e[0m on Modules\Windows\main.tf line 19, in resource “azurerm\_windows\_virtual\_machine” “cboardvm”:

2021-08-07T02:08:09.8338940Z 19: resource “azurerm\_windows\_virtual\_machine” “cboardvm” e[4m{e[0m

2021-08-07T02:08:09.8339485Z e[0m

2021-08-07T02:08:09.8339833Z e[0me[0m

2021-08-07T02:08:09.8340158Z e[31m

2021-08-07T02:08:09.8342801Z e[1me[31mError: e[0me[0me[1mError creating Windows Virtual Machine “vm01” (Resource Group “TerraformTestRG”): compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=0 – Original Error: autorest/azure: Service returned an error. Status= Code=“OperationNotAllowed” Message="Operation could not be completed as it results in exceeding approved standardDSv3Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 10, Current Usage: 8, Additional Required: 4, (Minimum) New Limit Required: 12. Submit a request for Quota increase at [Microsoft Azure](https://aka.ms/ProdportalCRP/?#create/Microsoft.Support/Parameters/%7B%22subId%22:%223c005fc9-2ae5-4c5d-ac1d-052969313e59%22,%22pesId%22:%2206bfd9d3-516b-d5c6-5802-169c800dec89%22,%22supportTopicId%22:%22e12e3d1d-7fa0-af33-c6d0-3c50df9658a3%22%7D) by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at [https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests."e](https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests.%22e)[0m

2021-08-07T02:08:09.8345629Z

2021-08-07T02:08:09.8346273Z e[0m on Modules\Windows\main.tf line 19, in resource “azurerm\_windows\_virtual\_machine” “cboardvm”:

2021-08-07T02:08:09.8347122Z 19: resource “azurerm\_windows\_virtual\_machine” “cboardvm” e[4m{e[0m

2021-08-07T02:08:09.8347703Z e[0m

2021-08-07T02:08:09.8348124Z e[0me[0m

Processing: main.tf…  
Processing: variables.tf…

Does anybody has an idea how to make the modules to work for multiple resources?

---

<div class="post-metadata">

**Author:** ![stuart-c](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/stuart-c/32/10789_2.png) [@stuart-c](https://discuss.hashicorp.com/u/stuart-c)\
**Post date:** [August 7, 2021, 6:50am UTC](https://discuss.hashicorp.com/t/cant-create-multiple-resources-using-modules/27931/2 "2021-08-07T06:50:30Z")

</div>

As the error says you do not have enough permitted capacity to create more cores, so you need to request a quota increase.

---

<div class="post-metadata">

**Author:** ![dracozero7](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/dracozero7/32/21395_2.png) [@dracozero7](https://discuss.hashicorp.com/u/dracozero7)\
**Post date:** [August 7, 2021, 2:17pm UTC](https://discuss.hashicorp.com/t/cant-create-multiple-resources-using-modules/27931/3 "2021-08-07T14:17:05Z")

</div>

You are right, I must have missed that part of the log in the devops log output, thanks that was the fix, I changed the VM size and its indeed creating al required resources
