For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
Manning Publications Co.
2022 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.
front matter
foreword
As an engineer, I know how important it can be to find a solid introduction to a new topic. Blogs, documentation, and Q&A platforms can be a great source of information, but they almost always assume basic knowledge of a topic. A good book is unique in the sense that it can provide you with that basic knowledge.
A good book is designed to take you on a well-thought-out journey along one subject after another to help you build a fundamental understanding of the topic. Once you have completed that journey, other sources can augment your knowledge and help you overcome specific problems. Without that fundamental understanding, other sources can help you overcome problems, but you might have difficulty connecting these smaller nuggets of knowledge to what you already know.
This book, Azure Infrastructure as Code, is such a book that takes you on a learning journey. First, you will learn the basics of IaC and how the Azure Resource Manager works. From there, it takes you on a journey past ARM template syntax, to an understanding of the deployment process, up to Azure Bicep or BicepLang, the latest IaC language for Azure.
Once you have the syntax down and are able to work with Bicep, the remainder of the book takes you past many other capabilities of the Azure Resource Manager that will help you to scale your use of IaC to multiple teams or even complete organizations.
I hope you will join Henry, Erwin, and Eduard on a journey to learn all about Azure Infrastructure as Code!
Scott Guthrie, Executive Vice President at Microsoft
Henry, Erwin, and Eduard are all deeply involved in the Azure, ARM template, Bicep, and DevOps communities. As a result, all three are experts in this field, and it is no surprise that this book is an immensely valuable resource when it comes to learning about Infrastructure as Code (IaC) on Azure.
What I particularly like about this book is its focus on the fundamentalsfirst focusing on Infrastructure as Code as a general concept, then spending lots of time on ARM templates, all before teaching Bicep itself. This foundation is something we always try to teach Azure users, as it allows you to learn not just what Azure is today, but how to keep up with Azure as it evolves.
Finally, the last third of the book covers how you use IaC in practice by teaching you how to integrate your code with CI/CD tooling, Azure Policy, testing strategies, and deployment stacks. This next level of depth is what supercharges your already valuable infra code.
This book is exactly what you need to go from 0 to 100 with Azure Infra-as-code. Enjoy!
Alex Frankel, Program Manager
on the Azure Resource Manager team at Microsoft
preface
Well over a year ago, the three of us set out to write a book to teach people how to manage Azure Infrastructure as Code (IaC) with native Azure tools. Since then, we have written a total of thirteen chapters that we believe will take you from zero to hero!
IaC is an important topic, as not a single line of code can run on its own. Everything has to run on top of something. An OS runs on top of the hardware, a program on top of the OS, and most modern applications on top of a runtime. As engineers, we consider most of these things our programs run on top of to be infrastructure.
The cloud has changed the way we look at infrastructure. It is no longer bought and nurtured for two to five years. Instead, it is created when we need it and disregarded when we no longer need it. To fully exploit this flexibility that cloud offerings like Microsoft Azure bring, we need a way to quickly and reliably create our infrastructure. And for engineers, is there a better way than through code?
There are many resources already available about these topicsmany blogs written by experienced engineers, and a body of MS Learn and MS docs materials and write-ups about individual features. Yet, there was still one thing missing: a single body of knowledge that captures all you need to get you fully up to speed. A single comprehensive body of knowledge, organized so that you can read it front to back. We hope that is changed by this book.
In this book, we have chosen to take a bottom-up approach, where you will first learn about the basics that will directly help you in your job and also help you understand the topics that follow. A deep understanding of these basics will help you throughout your career, not only when youre working with the current technologies, but also with what the future will bring.