Pulumi Tutorials and Infrastructure As Code (IAC)

Hi Folks,

Hope you all are doing good there. Today’s age where almost all the organizations have onboarded their compute and infrastructure on Public or Hybrid cloud, the importance of having Infrastructure or Cloud Infrastructure definition and configuration as Code is unimaginable.

P.S I will be keep adding further blogs link about Pulumi. Until then please have a read on below content.

Tutorials

  1. Pulumi Fundamentals and Architecture
  2. Pulumi & Infrastructure as Code(IaC) with AWS
  3. Pulumi & Infrastructure as Code(IaC) with Azure
  4. more coming soon

What is Infrastructure as Code ?

Wikipedia defines IaC as follows:

Infrastructure as code is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.

or in other words

Infrastructure as code (IaC) means to manage your IT infrastructure using configuration files.

Why we need to do IAC ?

As said before IAC means managing the Cloud infrastructure creation and management through configuration files.

Benefits of IAC

  • Writing Infrastructure configuration as code or template ease out the work more than manual process.
  • The templates or code enhance the possibility of reusability instead repeatable manual actions.
  • The tracking of infrastructure configuration becomes easier with IAC and the source code management also becomes feasible with pushing those code and template files into Git / Azure DevOps..
  • The integration of CI/CD with IAC makes deployment of cloud infrastructure resources easier to be available.

What are the popular IAC tools ?

AWS Cloud Formation, Google Cloud Deployment manager , Azure resource manager template( ARM) , Terraform , Ansible, Pulumi are the few widely famous tools for IAC. Few of them requires to write infrastructure configuration as JSON and few them requires to write as YAML templates.

What is Imperative vs Declarative IAC ?

In Declarative way of IAC , the developer / devops engineer defined the desired desired end state of the infrastructure, adding the resources which need to be deployed and their configuration, and the IaC tool will figure out the rest. The declarative approach is closer to what the user wants from computers. In one sense, the Declarative approach serves the user.

In Imperative way of IAC, the developer define and run the commands/code in a specific order, so the desired state could be achieved. The imperative approach doesn’t store or manage any state, and you run the same command over and over again, we might not get the same results. The imperative approach is closer to how computers run things. In one sense, the Imperative approach serves the machine.

What is Pulumi and Terraform? & How Pulumi is different from Terraform?

Pulumi : Pulumi is an open-source IaC tool for designing, deploying and managing resources on cloud infrastructure. The tool supports numerous public, private, and hybrid cloud providers, such as AWS, Azure, Google Cloud, Kubernetes, phoenix NAP Bare Metal Cloud, and OpenStack.

Pulumi is used to create traditional infrastructure elements such as virtual machines, networks, and databases. The tool is also used for designing modern cloud components, including containers, clusters, and serverless functions.

While Pulumi features imperative programming languages, use the tool for declarative IaC. The user defines the desired state of the infrastructure, and Pulumi builds up the requested resources.

Terraform : Terraform is a popular open-source IaC tool for building, modifying, and versioning virtual infrastructure.

The tool is used with all major cloud providers. Terraform is used to provision everything from low-level components, such as storage and networking, to high-end resources such as DNS entries. Building environments with Terraform is user-friendly and efficient. Users can also manage multi-cloud or multi offering environments with this tool.

Terraform is a declarative IaC tool. Users write configuration files to describe the needed components to Terraform. The tool then generates a plan describing the required steps to reach the desired state. If the user agrees with the outline, Terraform executes the configuration and builds the desired infrastructure.

https://phoenixnap.com/blog/pulumi-vs-terraform

Key Differences Between Pulumi and Terraform

  • Pulumi does not have a domain-specific software language. Developers can build infrastructure in Pulumi by using general-purpose languages such as Python , Go, .NET, JavaScript, etc. Terraform, on the other hand, terraform uses its Hashicorp Configuration Language(HCL).
  • Terraform follows a strict code guideline. Pulumi is more flexible in that regard.
  • Terraform is well documented and has a vibrant community. Pulumi is much new in the market hence has a smaller community and it is slowly getting documented.
  • Terraform is easier for state file troubleshooting.
  • Pulumi provides superior built-in testing support due to not using a domain-specific language.

References

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SaurabhG

I am an enthusiastic learner. Always want to challenge my last learning & keep hunting for new learning. about.me/saurabh.gangrade