TERRAFORM CLOUD

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Write a comparison between Ansible Vs Docker Vs Terraform:

ANSIBLEDOCKERTERRAFORM
Uses pythonRun on programmingConfig management tool
Ansible is an excellent useful tool for front-end developers, particularly in situations where some programming is required.Docker has multi-components.focuses on infrastructure automation, and interprets a model described in Hashicorp Configuration Language (HCL).
Ansible also easy to use and effective for configuration managementDocker is easy to understand and isolateTerraform is a service orchestration tool.
Radically simple configuration-management, application deployment, task-execution, and multi-node orchestration engine.Enterprise Container Platform for High-Velocity Innovationis an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure.

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.

provider "aws" {

source = "terraform"{
version = "~> 2.8"
 }
}

resource provider "linux security group " allow key to login to linux ec2 instance"{

description = " allow key to login linux ec2 instance" 
}

region = "us-west-2" {
    access_key = "AKIAYIMEDZZZKEPKRNEM"
    secret_key = "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"

resource " linux_instance""first-ec2"{

ami = "ami-03d5c68bab01f3496" 
instance type = "t2.micro"
tags = {
   Name = "Akshatha Ashwathnarayan"
  }
}
}