Terraform - Automation

💡
Infrastructure automation to provision and manage resources in any cloud or data center


user: testuser
password: tz1L5=XA
Secret access key: hR8Jw1N2iv+ArjhMxoA4DEZ4GN+ADmVOx3WxIs3v
Access Key: AKIAQRU7H34APSCDY2QT
ami: ami-007020fd9c84e18c7

Local setup

provider "aws" {
  region     = "ap-south-1"
  access_key = "AKIAQRU7H34APSCDY2QT"
  secret_key = "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"
}
resource "aws_instance" "app_server" {
  ami           = "ami-007020fd9c84e18c7"
  instance_type = "t2.micro"
  tags = {
    Name = "testServerInstance"
  }
}
./terraform.exe fmt
./terraform.exe plan
./terraform.exe init

Creating Instance

./terraform.exe apply

Deleting Instance

./terraform.exe destroy
provider "aws" {
  region     = "ap-south-1"
  access_key = "AKIAQRU7H34APSCDY2QT"
  secret_key = "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"
}
resource "aws_instance" "app_server" {
  ami           = "ami-007020fd9c84e18c7"
  instance_type = "t2.micro"
  count = 5
  tags = {
    Name = "testServerInstance"
  }
}