The State of Azure IaC

Originally published at: The State of Azure IaC - Skycrafters

Project Bicep is a new, open-source project from Microsoft to fix most of the issues with ARM; making it better and open (available on GitHub) to whoever wants to build infrastructure-as-code in Azure.

3 Likes

I love this content. Despite the technical nature of it, it doesn’t feel heavy to read at all. Well done, @felipecosta!

Have you migrated to use Bicep instead already?

1 Like

@Jerms, have you seen this? @felipecosta talks about a new Microsoft created, open-source tool, that is WAY better than ARM.

1 Like

I have not. I’ll have to share this with @harpermcd as he spends a lot more time in Azure than I and he and I were chatting about ARM last week. Looks very interesting indeed.

2 Likes

Not 100% but I’ve had just started a project with our friend “Gonzo”, keep your :eyes: on my GitHub… Soon we will publish something there

2 Likes

Why don’t you invite him here so he can share his experience as well?

I actually did last week, but you know how it is…

8 Likes

Wait. Somebody mark this down. I believe this is the very first Skycrafters meme, correct?

3 Likes

I think you are right, @padaron.

Is there a badge for that?

1 Like

Unfortunately, while I applied for the position of Chief Keeper of the Skycrafter Badges, I was denied. But how can any self-respecting community exist without a healthy amount of memes?

3 Likes

@felipecosta I had so many thoughts come to mind. I was wondering if maybe you could help me gain some clarity on these thoughts. You said that Azure’s solution to stay competitive with tools like Terraform was the Bicep tool you are talking about in the article. Is Bicep only competitive in the way that it is a different style of writing code that is easier than the ARMs style, much like Terraform type tools? Or is it also multicloud? Do you know if AWS has something like the Bicep? Or do they just have Cloud Formation?

1 Like

WOW! That’s a big difference! Will definitely need to check this out.

1 Like

I’m not @felipecosta, but I’ll answer this one! AWS also has something called CDK, or Cloud Development Kit. It’s a way to describe architecture using your favorite programming language (as long it’s supported, of course). So you can do stuff like:

const bucketNames = ['CoolBucket', 'NiceBucket', 'GreatBucket', 'PublicBucket']
const buckets = bucketNames.map( bucketName => {
  return new s3.Bucket(this, bucketName, {
    bucketName: bucketName,
    versioned: true,
    publicReadAccess: bucketName.toLowerCase().includes('public)? true : false
  });
})

Which would create 4 buckets, but only one of them private because its name has the word public on it. Even better: You can create a new construct out of it, let’s say MyS3BucketStyle. So anyone in your organization can do the following:

const bucketNames = ['CoolBucket', 'NiceBucket', 'GreatBucket', 'PublicBucket']
const buckets = bucketNames.map( bucketName => {
  return new MyS3BucketStyle(this, bucketName)
})

Which would apply all the appropriate expect parameters to this bucket creation, including making the one that has public in its name public and the rest private.

How cool is that?! Should I write an article about CDK? :thinking:

2 Likes

Ya maybe write one about CDK or maybe the comparison of the IaC flavors? I knew about CDK but didn’t know it was similar to Terraform. I for sure have holes in my knowledge on all the different ways to IaC :joy: I might need to nerd out later and see some graph or something of the differences. Either way if you wrote it I would read it!

2 Likes

There is a big difference between Terraform and CDK. Well, two actually. CDK is AWS only (although there is a CDK-Terraform) and Terraform has its own DSL (domain-specific language), while CDK allows you to use whatever language you are already familiar with. This a HUGE win in my books!

2 Likes

Ok so is Bicep like CDK using any language but specific to Azure only (instead of AWS)? Or is it like Terraform with a specific language and multicloud? Also I look forward to when you write this article :joy: :wink:

2 Likes

I am so late!!! sorry all

@Tabs yeah Bicep is more similar to terraform in a matter of being a “descriptive” way to declare your infrastructure but still Azure only, while terraform is multicloud. Just like Rapha said, CDK is a little different where instead of using a “domain-specific language” you can just use something like NodeJS :heart: to write how you want to build your infrastructure.

This is helpful if you are a developer or familiar with coding and building for AWS. In the Azure case, my take is that write ARM was so difficult for their users that they had to come up with something easier, and honestly, I don’t think most of Azure users are developers, but IT Admins that came from a On-Prem world to the Cloud, so they are not as familiar with coding as AWS users in most of the cases (But this is just an speculation from my part)

3 Likes

Awesome thanks @felipecosta now all of my original questions are answered! I have just one more. lol. Is there a tool out there that is like CDK in the way that you can use different languages but that is also multicloud?

1 Like

I’m glad you asked! Pulumi is this tool. You can use either Node, Python, .NET Core, or Go and write infra for AWS, Azure, GCP, or even Kubernetes. I’ve heard wonder about it, but I haven’t played with it myself yet, though.

1 Like