[go: up one dir, main page]

0% found this document useful (0 votes)
7 views4 pages

Terraform Project

This document outlines the steps to set up a Terraform project on AWS, including prerequisites like finding an AMI ID and installing necessary software such as Terraform, Python, and AWS CLI. It details the process of configuring access keys, creating an S3 bucket, defining configuration files, generating a key pair, and executing Terraform commands to initialize, plan, and apply the infrastructure. Finally, it instructs to access the EC2 instance's public IP to view the Apache webpage.

Uploaded by

vinay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Terraform Project

This document outlines the steps to set up a Terraform project on AWS, including prerequisites like finding an AMI ID and installing necessary software such as Terraform, Python, and AWS CLI. It details the process of configuring access keys, creating an S3 bucket, defining configuration files, generating a key pair, and executing Terraform commands to initialize, plan, and apply the infrastructure. Finally, it instructs to access the EC2 instance's public IP to view the Apache webpage.

Uploaded by

vinay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

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

You might also like