Working With Terraform

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

Write a comparison between Ansible Vs Docker Vs Terraform

Terraform Ansible D

Tool categoryOrchestrationConfiguration management
ApproachImmutable infrastructureMutable infrastructure
LanguageDeclarativeImperative
ProvisioningSpecializes in infrastructure provisioningLimited support for infrastructure provisioning
LIfecycle managementLifecycle aware.  Maintains state of deployments.No lifecycle awareness
Command line operationYesYes
AgentlessYesYes

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 ec2 instance"{

description = " allow key to login ec2 instance" 
}

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

resource " aws_instance""first-ec2"{

ani = "ani-03d5c68bab01f3496" 
instance type = "t2.micro"
tags = {
   Name = "Anitha"
  }
}
}Code language: PHP (php)