-
Notifications
You must be signed in to change notification settings - Fork 2
Foggfile
The Foggfile allows you to save, and version control, the arguments that you would normally supply to the fogg command on the CLI. The file is of JSON format and although it should normally be saved at the root of the repository, you can save it else where and specify a FoggfilePath to the fogg command.
The following is a basic example of the Foggfile:
{
"SubscriptionName": "Azure Subscription Name",
"Groups": [
{
"ResourceGroupName": "basic-rg",
"Location": "westeurope",
"TemplatePath": "C:\\path\\to\\template.json",
"VNetAddress": "10.1.0.0/16",
"SubnetAddresses": {
"vm": "10.1.0.0/24"
}
}
]
}If the path used for the
TemplatePathis relative, it must be relative to the Foggfile's location
Assuming this file is saved at the root of your repo, you only need to run:
foggOtherwise, specify the path to the Foggfile:
fogg -FoggfilePath "C:\path\to\Foggfile"For a description of the parameters, see the table for the CLI Arguments
It is possible to override the value in a Foggfile with values you specify on the CLI. For example, if your Foggfile had a the following: "SubscriptionName": "Some Azure Sub", but you needed a different subscription name of "Developer Azure Sub", then you don't need to alter the file! All you have to do is pass it in on the CLI:
fogg -SubscriptionName "Developer Azure Sub"Now Fogg will use the value from the CLI rather than the Foggfile.
It's worth noting that this overriding rule does apply to ResouceGroupName and the others inside the Groups array also. However, the value you pass in on the CLI will override every value in the Groups array. Ie, the following:
fogg -ResourceGroupName "other-rg"Will override every ResourceGroupName in the Foggfile. Although this seems bad, it is useful for things like Location - so you can easily change all locations from West Europe to North Europe via:
fogg -Location "northeurope"