Have to create/launch Application using Terraform
- Create the key and security group which allow the port 80.
- Launch EC2 instance.
- In this EC2 instance use the key and security group which we have created in step 1.
- Launch one Volume (EBS) and mount that volume into /var/www/html
- Developer have uploded the code into github repo also the repo has some images.
- Copy the github repo code into /var/www/html
- Create S3 bucket, and copy/deploy the images from github repo into the s3 bucket and change the permission to public readable. 8 Create a Cloudfront using s3 bucket(which contains images) and use the Cloudfront URL to update in code in /var/www/html.
-
copy file auto.tf
-
start typing.
terraform init terraform validate terraform apply -auto-approve
-
It will start performing task according to coded file.
READY CLOUD PAGE
-
to destory entire enviroment.
terraform destroy -auto-approve