πŸš€ DevOps Certified Professional
πŸ“… Starting: 1st of Every Month 🀝 +91 8409492687 | 🀝 +1 (469) 756-6329 πŸ” Contact@DevOpsSchool.com

Get into Terraform

DevOps

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

  1. Write a comparison between Ansible Vs Docker Vs Terraform :
  • Terraform
    • Terraform focuses on infrastructure automation, and interprets a model described in Hashicorp Configuration Language. Terraform has Immutable infrastructure. Terraform Specializes in infrastructure provisioning. Terraform provides Lifecycle aware.  Maintains state of deployments.
  • Ansible
    • Ansible takes an imperative or procedural approach, which is familiar to anyone experienced in scripting. Ansible has Mutable infrastructure. Ansible gives Limited support for infrastructure provisioning. There is no lifecycle awareness in Ansible.
  • Docker
    • Docker is a Storage/Volume Management ,Orchestration and Schedulers. Docker has Mutable infrastructure. Docker Specializes in infrastructure provisioning.

2. Write a terraform script where you create a linux ec2 instance with Security group and key defined so you should be able to use key to login to ec2 instance :

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = "3.49.0"
    }
  }
}
provider "aws" {
  region  = "us-west-2"
  access_key = "AKIAYIMEDZZZKEPKRNEM"
  secret_key = "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"
}

resource "aws_instance" "Anubhab" {
  ami           = "ami-03d5c68bab01f3496"
  instance_type = "t2.micro"
  

}