The "problem" of "Infrastructure as a Code" is that
most in most of current solutions the "code" is actually configuration,
a simple while custom JSON and YAML.
That does not have expressiveness of a "proper" programming language:
they are not "Turing complete", even with extensions.
The new modern solutions like Pulumi are solving problem by embedding "infrastructure"
as libraries to existing programming languages,
or like in case of Terraform by a new "DSL" : domain specific language.
AWS has opted to leverage existing programming languages,
starting from TypeScript as a "base" for code generation,
and using CloudFormation (JSON/YML) as the target.
Azure has opted to create DSL "Bicep" pre-processor for generating JSON ARM,
using custom "purified" and extended syntax, i.e. by adding params, ifs, loops etc.
Bicep is open source, written in C#, the most common language of Microsoft Azure.
So both provide benefit of simplification of syntax,
while in both cases essential knowledge of underlying platforms is still required.
And unfortunately in all mentioned cases, as well as with all modern programming languages
the transformations tooling is custom, and limited to one or few languages and planforms.
Azure/bicep: Bicep is a declarative language for describing and deploying Azure resources
Azure Bicep March 2021: Learn everything about the next generation of ARM Templates - YouTube
Infrastructure as Code - An intro - Part 4 - Using Bicep
Infrastructure as code in 2021 - DEV CommunityHow Azure Bicep is Different. How emerging technologies solve classic… | by Yi Lu | Slalom Build | Medium
The Bicep DSL is an enhancement of JSON configuration language. It introduces some flow-control elements such as loops, ternary operators and one-line resource references, yet it stops short of classes or inheritance. The enhanced syntax greatly improves functionality and reduces code size, at the cost of mildly increased complexity. As an Azure-native technology, Bicep also has two advantages over approach one: day-zero support and no maintenance of state files.
Post a Comment