In this chapter, we scale up the difficulty significantly and start using code to script the creation of our infrastructure. That is, we’ll now be using the technique known as infrastructure as code to automate the creation of our infrastructure.
So far, we’ve manually created our cloud-based infrastructure through the Azure portal. We manually created a container registry in chapter 3 and manually created a Kubernetes cluster in chapter 6. In this chapter, we’ll be creating these same things again; however, instead of creating them manually using the Azure portal, we’ll write code and run it on our local computer to create our infrastructure in the cloud.
This chapter is significantly more difficult than anything before it. As such, I’ve designed this chapter to be skipped, so if this is too much or not interesting, move directly to chapter 8 if you like. You can come back to this chapter again in the future. But if you’re keen to learn Terraform and infrastructure as code, or you just want to fully automate the creation of your infrastructure alongside the deployment of your microservices application, please continue reading.