TERRAFORM PROJECT
Prerequisite -
- Search the AMI ID in the AWS US-WEST-2 and
add it in the variables.tf
Step1 - Clone the repository in local
https://github.com/praveen1994dec/
Terraform_wc.git
Step2 - Install terraform in local
https://www.terraform.io/downloads
Step3 - Install Python if not already
done
https://www.python.org/downloads/
Step4 - Install aws cli
https://docs.aws.amazon.com/cli/v1/
userguide/install-macos.html
Step5 - Create access key for
terraform
https://aws.amazon.com/console/
Step6 - Use aws configure to
configure the access keys and
secret keys [ aws configure
command]
aws configure
Step7 - Create a S3 bucket and add
the name in config.tf file in code
Step8 - Define variables.tf and
config.tf files
Step9 - Create Key pair and hit the
below command in terminal
ssh-keygen -f oregon-region-key-pair
Step10 - Replace the
PUBLIC_KEY_PATH in variables.tf with
the path of above generated file
Step11 - terraform init
Step12 - terraform plan -out "file.plan"
Step13 - terraform apply
Step14 - terraform destroy
Step15 - Hit the EC2 Public IP in
browser and you will be able to see the
APACHE WEBPAGE