Skip to content

Commit 7adf329

Browse files
committed
added ncpu keyword to vmtemplate
1 parent a07e78c commit 7adf329

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/templates.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ to the `~/.azmanagers` folder.
4848
* `resourcegroup_vnet` Azure resource group corresponding to the virtual network, defaults to `resourcegroup`
4949
* `resourcegroup_image` Azure resource group correcsponding to the image gallery, defaults to `resourcegroup`
5050
* `osdisksize=60` Disk size in GB for the operating system disk
51+
* `ncpu=nothing` Number of CPU's available on resource
5152
* `skutier = "Standard"` Azure SKU tier.
5253
* `datadisks=[]` list of data disks to create and attach [1]
5354
* `tempdisk = "sudo mkdir -m 777 /mnt/scratch; ln -s /mnt/scratch /scratch"` cloud-init commands used to mount or link to temporary disk
@@ -295,6 +296,7 @@ function build_vmtemplate(name;
295296
imagename,
296297
vmsize,
297298
osdisksize = 60,
299+
ncpu = nothing,
298300
datadisks = [],
299301
tempdisk = "sudo mkdir -m 777 /mnt/scratch\nln -s /mnt/scratch /scratch",
300302
nicname = "cbox-nic",
@@ -372,6 +374,9 @@ function build_vmtemplate(name;
372374
)
373375
)
374376
)
377+
if !isnothing(ncpu)
378+
template["value"]["properties"]["hardwareProfile"]["nCPU"] = ncpu
379+
end
375380
if !isempty(tags)
376381
template["value"]["tags"] = tags
377382
end

0 commit comments

Comments
 (0)