Note: use your own access key and secret key
vim abid.tf
provider "aws" {
region = "us-east-1"
access_key = "AKIARUPJBF7JBKVUGQ"
secret_key = "KfU0tFpao0b+BOGG63xN99jTMdfVkt1aurid"
}
resource "aws_instance" "web" {
ami = "ami-02e136e904f3da870"
instance_type = "t2.micro"
tags = {
Name = "HelloWorld"
}
}
Now use terraform init tio download all plugins
terraform apply - what it will do
terraform apply - to run code
terraform destroy - to delete the instance
Comments
Post a Comment