-
Notifications
You must be signed in to change notification settings - Fork 2
Template Structure
The template file is of JSON format, and describes the infrastructure that you want to deploy. It allows you layout what VMs/VPNs you wish to deploy, as well as provisioners, firewall rules, OS type and other things.
The template file can the following sections:
- template (an array of VM/VPNs to deploy)
- provisioners (for declaring script paths and software to install)
- firewall (for defining inbound and outbound rules for all VMs)
- os (to declare to global OS type and size for all VMs)
In general, this will look like the following:
{
"pretag": "wiki",
"template": [
{
"tag": "example-vm",
"type": "vm",
"count": 1
}
],
"provisioners": {
"web": "dsc: @{web-server}"
},
"os": {
"size": "Standard_DS1_v2",
"type": "Windows",
"publisher": "MicrosoftSQLServer",
"offer": "SQL2016SP1-WS2016",
"skus": "Standard"
},
"firewall": {
"https|both": true,
"inbound": [ ],
"outbound": [ ]
}
}The
"pretag"allows you to override the default naming from Fogg. If you ran the above template for a Resource Group calledfogg-wiki-rg, then the VM created would be calledfogg-wiki-example-vm1- which is a bit of a mouth full! The pretag will override this so it'd now bewiki-example-vm1
Most times, the only sections you'll need will be the template and provisioners sections.
Once a template has been run, Fogg will return a Results Object that contains information about what Fogg just deployed.