Terraform – Infra as a code
- terraform init – download plugins to local directory
- terraform plan – its shown details of your changes
- create resource
- destory resources
- modified resources
- terraform apply – excute plan changes
- terraform destory – remove all resources created by terraform
*.tf
installations:
choco install terraform -y
create file provider.tf add below data
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
}
}
# Configure the AWS Provider
provider "aws" {
region = "us-east-1"
}
Main.tf
resource "aws_s3_bucket" "first_bucket" {
bucket = "qt-demo-terraform-s3-demo"
}
