When starting out with anything new, the key is how to get started quickly. Sometimes even knowing where to start can be difficult. For those of you working, or wanting to work with Terraform, I would like to introduce you to NubesGen. The capability to generate Bicep is still in preview, but it uses the same process. It's a homegrown project built by folks here at Microsoft that allow you to easily generate Terraform templates using best practices. The NubesGen project is open sourced, so you can contribute to the project or raise an issue from the GitHub repo.
I am going to walk you through how to quickly get started using NubesGen and have a ready to use template in hand, within a minute! From there, I have included resources that walk you through crucial topics to be aware of when using infrastructure as code and deploying into Azure.
Getting Started with NubesGen
To get started, go to www.NubesGen.com. Scroll down and generate your template with the settings and features that you require:
Select ‘Download Configuration Files':
The newly generate files are downloaded as a .zip file locally to my machine. I extract my files and open them with VSCode:
I can now review the files and execute my newly created templates. If you view the NubesGen page that you just generated your templates from, you will be directed to the quick start guide that shows you HOW to deploy your new templates:
While this tool is incredibly easy to use, it can help you skill up when just starting out with Terraform or Bicep. To learn more about best practices when deploying Bicep or Terraform, follow the hands on tutorials below! We dive further into the importance of naming conventions when deploying to Azure. Naming conventions are critical for identifying your resources, especially as your list of resources grows. Watch how to get started using NubesGen and WHY naming conventions are beneficial when using both Bicep and Terraform:
Manage Your Secrets when Using Infrastructure as Code
Never put sensitive data in your templates, sounds simple? Watch the tutorial as we show you how to manage your secrets in your templates:
Protect Your Production Infrastructure with IaC
We've all been there, we just deployed something to production and broke EVERYTHING. While using Infrastructure as code is a highly powerful tool, learn how to protect your production environment from incorrect deployments:
Tagging Resources with Infrastructure as Code
Tagging strategies are crucial to managing, organizing and maintaining a successful infrastructure in Azure. Watch how NubesGen makes this easy for you, and why tagging strategies are important:
I hope that this blog has helped you get started quickly with using Terraform and Bicep templates, with some further learnings so that you can be successful in your infrastructure as code deployments!
NubesGen on GitHub: https://github.com/microsoft/nubesgen