Farmer :: Farmer (original) (raw)

Making repeatable Azure deployments easy!

Farmer is an easy-to-learn library for rapidly authoring and deploying entire Azure architectures.

Already using ARM templates?

Farmer has you covered.

Why not Azure Resource Manager?

Azure Resource Manager is a service-side orchestrator, as such, Farmer does use ARM! It simply replaces the templating language with a statically-verifiable DSL to declare resources and comes with helper functions to perform common tasks. Farmer templates are around 5-8 times smaller than ARM templates, meaning they are quicker and easier to author, understand and maintain. Read more on the comparison page.

Creating a web application with a configured application insights and a linked storage account

Farmer Templates

These 20 lines of simple, readable and type-safe code are translated into 141 lines of JSON ARM template!

// Create a storage account with a container
let myStorageAccount = storageAccount {
    name "myTestStorage"
    add_public_container "myContainer"
}

// Create a web app with application insights that's connected to the storage account.
let myWebApp = webApp {
    name "myTestWebApp"
    setting "storageKey" myStorageAccount.Key
}

// Create an ARM template
let deployment = arm {
    location Location.NorthEurope
    add_resources [
        myStorageAccount
        myWebApp
    ]
}

// Deploy it to Azure!
deployment
|> Writer.quickWrite "myResourceGroup"

Want to try it out? Follow our quickstart guide now!