Posts

Moving away

After publishing few posts on Blogger platform I discovered its decent limitations when it comes to running development/technical blog. Essentially this boils down to painful process of adding code snippets and text formatting. To address that issue I decided to move to GitHub Pages + Jekyll. The new address of blog is: https://sszarek.github.io/

Provisioning Azure resources with Terraform - Part 1 - Basics

Image
Intro Terraform is one of the popular Infrastructure as Code (IaC) tools. There are simple yet powerful ideas behind the tool: It uses configuration files to describe infrastructure. The configuration is written in declarative language called HCL (Hashicorp Configuration Language). Thanks to rich Terraform Registry it supports dozens of providers - this obviously includes Azure along with GCP and AWS. In order to create resources in proper order it creates dependency graph between them. When deploying infrastructure changes it is saving state of the infrastructure. With this approach in case of change in infrastructure it is able to use the state to calculate which resources have changed and update only those. This article starts short series which will lead you through basics of provisioning Azure resources with Terraform by building infrastructure for running serverless application with Azure Functions. As a prerequisite you will need to execute following steps: Download Terraform. ...

Diagnosing Azure Resource Manager template validation errors

Image
In previous post I have provided intro to Azure Resource templates. While performing deployment of the template you might run into situation where Azure is returning quite a cryptic message similar to one one the screenshot below. From the error you will get few pieces of information: Name of the template: azuredeploy Template has failed validation procedure You can check details with provided tracking Id which is some Guid Details we are looking for can be found in Activity Log of Resource Group to which deployment was done and there are few ways we can get it. Activity Log is a place where actions related to resources are logged (in this case we will be looking for logs on Resource Group level) e.g.: Deletion of resources Deployments Starting and stopping of resources The logs include such information as: Timestamp Principal which initiated event JSON object which describes change in details Break something! To show you sample error like one on the screenshot above we will break som...

Provisioning with Azure Resource Manager templates

Image
Provisioning cloud resources Cloud providers offer lots of services to be used by developers. The mentioned services range from traditional virtual machines, through storage solutions to AI tooling. Each of them is just smaller or bigger building block which can be used when putting together more complex system. When starting your journey with cloud you will probably be amazed with what you will see in various tutorials: with few clicks in AWS/Azure/Google cloud console you can provision all the stuff which is needed for running your cool application. In fact clicking through the cloud provider UI is great when learning and you just want to play with this stuff. While great for learning purposes this approach does not scale when: Working on bigger cloud project where you need to provision lots of stuff Working with the team You need to create additional environments and cloud infrastructure should be the same The reason why the approach mentioned above does not scale is because it is m...