Wednesday, June 29, 2022

Terraform vs Pulumi

This article is all about terraform vs pulumi difference.


There are many (IaC) infrastructure as code tools are available. but today we are going to understand the two most popular IaC tool currently in the market. 

1. Terraform

2. Pulumi

What is Terraform?

It is an open-source laC solution that helps you maintain and provision cloud infrastructures. You use a custom declarative language to describe Terraforms required components. Then, Terraform generates a plan to achieve your desired outcome.

Terraform a domain-specific language (DSL) called HashiCorp Configuration Language (HCL). HCL provides arguments, expressions, and blocks to simplify the Terraform configuration.

Below is the terraform example code.

provider "aws" {
  profile    = "default"
  region     = "us-east-1"
}

resource "aws_instance" "example" {
  ami           = "ami-2757f001"
  instance_type = "t2.micro"
}

What is Pulumi?

It is fast-growing IaC solution. You can use it to maintain, deploy, and configure resources on your cloud infrastructure, as well as improve its efficiency.

It supports multiple private, hybrid, and public cloud providers such as OpenStack, Kubernetes, Google Cloud, Azure, Amazon Web Services (AWS), and phoenixNAP Bare Metal Cloud.

Pulumi is a multi-language infrastructure as code tool. Pulumi supports all major language.

The following language runtimes are currently supported by Pulumi.

  • Node.js
  • Python
  • Go
  • C#
  • Java
  • YAML
You can chose any language to write your Infra. Below is example python code.

import pulumi
from pulumi_aws import s3

# Create an AWS resource (S3 Bucket)
bucket = s3.Bucket('test-bucket')

# Export the name of the bucket
pulumi.export('bucket_name',  bucket.id)
Cop


No comments:

Post a Comment

What is DevOps? DevOps Kya hai?

DevOps is not a tool or a software. DevOps simply is a hassle free process to implement, develop and deliver the product to client. It'...