Jump to content

How To Easily Generate Terraform or Bicep Files


Recommended Posts

Guest April Edwards
Posted

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:

 

 

 

largevv2px999.jpg.ed88f212f158166f9594b50e49007922.jpgNubesGen Configuration Page

 

 

 

 

 

 

 

Select ‘Download Configuration Files’:

 

 

 

largevv2px999.jpg.940690582b18e3fb35bf35e1cec5348f.jpgDownload Config Files

 

 

 

 

 

The newly generate files are downloaded as a .zip file locally to my machine. I extract my files and open them with VSCode:

 

 

 

largevv2px999.thumb.jpg.74967523fe034279bafaf40f7a2514da.jpgNubesGen Terraform output

 

 

 

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:

 

 

 

largevv2px999.jpg.bc3bdf4cfc4bb5a6de18f952b45efaa0.jpgNubesGen Quick Start

 

 

 

 

 

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: https://aka.ms/nubesgen

 

NubesGen on GitHub: https://github.com/microsoft/nubesgen

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...