ARM Deployment

Overview

The ARM deployment builder is always the top-level element of your deployment. It contains the manifest of all Farmer resources that you create.

Builder Keywords

KeywordPurpose
locationSets the default location of all resources.
add_resourceAdds a resource to the template.
add_resourcesAdds a collection of resources to the template.
outputCreates an output value that will be returned by the ARM template. Since Farmer does not require variables, and the only parameters supported are secure strings, these will typically be an ARM expressions that are generated at deployment-time, such as the publishing password of a web app or the fully-qualified domain name of a SQL instance etc.

Example

let deployment =
    arm {
        // All resources will share this location
        location Locations.NorthEurope

        // Assume myStorageAccount and myWebApp have been defined...
        add_resource myStorageAccount
        add_resource myWebApp

        output "webAppName" myWebApp.Name
        output "webAppPassword" myWebApp.PublishingPassword
    }