5 Serverless made easy

 

This chapter covers

  • Deploying a serverless web application in Azure
  • Understanding design patterns for Terraform modules
  • Downloading arbitrary code with Terraform
  • Combining Terraform with Azure Resource Manager (ARM)

Serverless is one of the biggest marketing gimmicks of all time. It seems like everything is marketed as “serverless” despite nobody even being able to agree on what the word means. Serverless definitely does not refer to the elimination of servers; it usually means the opposite since distributed systems often involve many more servers than traditional system design.

One thing that can be agreed on is that serverless is not a single technology; it’s a suite of related technologies sharing two key characteristics:

  • Pay-as-you-go billing
  • Minimal operational overhead

Pay-as-you-go billing is about paying for the actual quantity of resources consumed rather than pre-purchased units of capacity (i.e. pay for what you use, not what you don’t use). Minimal operational overhead means the cloud provider takes on most or all responsibility for scaling, maintaining, and managing the service.

5.1 The “two-penny website”

5.2 Architecture and planning

5.2.1 Sorting by group and then by size

5.3 Writing the code

5.3.1 Resource group

5.3.2 Storage container

5.3.3 Storage blob

5.3.4 Function app

5.3.5 Final touches

5.4 Deploying to Azure

5.5 Combining Azure Resource Manager (ARM) with Terraform

5.5.1 Deploying unsupported resources

5.5.2 Migrating from legacy code

5.5.3 Generating configuration code