Terraform notes
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
1.write a comparison between Ansible vs Docker vs Terraform?
A) Ansible
Ansible is a configuration management tool which is used to create infrastructure as code that can be used to deploy repeatable environments.
Terraform
A)Terraform is an orchestration tool which stores the state of the environment and if anything is out of order it will automatically provide the resource when it is run again.
Docker
A) It is a software container technology platform that enables its users to create ,deploy, run, and manage applications within the containers.
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 {
linux ec2 instance ={
source = "hashicorp/linux ec2"
version = "~>3.27
}
}
provider "linux" {
profile = "jyoshna"
region = "us-west-2"
access_key = " "
secret_key = " "
}
resource "linux_security_group " allow key to login"{
name = "devopsschool"
description = " allow key to login ec2 instance"
}