Email = [email protected]
The assignment was to build Infrastructure for the AWS which includes VPC, Subnets - Public and Private, Route tables, Internet gateway,etc
Everthing should be such that it should be configured dynamically and minimal manual intervention is allowed and is to be kept in mind.In order to achieve the above used variables supported by the Terraform.
The code should be such that it should work in an region, and also multiple vpcs should be able to create without any problems in same region and in the same AWS account. Also, for different regions too the same workaround.
- Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
- Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
- Downloaded aws cli for dev and prod profiles to configure aws using both of the credentials of the dev and prod.
- Installed terraform in my machine to write IaaC to build the infrastructure as mentioned in the assignment.
- Read the terraform documentation in order to write the code to create infrastructure
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Also created .tf file for variable declaration and created .tfvars file to define those declared variables in the .tf variable files
- Added necessary terraform files like state and lock files to be ignored in the .gitignore file.
The assignment was to build Infrastructure for the AWS which includes VPC, Subnets - Public and Private, Route tables, Internet gateway,etc
- Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
- Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
- Read the terraform documentation in order to write the code to create infrastructure
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Created ec2 and security groups using terraform
- Used demo as a profile to launch the ami
- Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
- Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
- Wrote the code to add record of type "A" for route53
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Created the infrastructure and tested the application using the domain name
Need to add policy for Cloudwatch services and attach it to an Ec2 instance role so that Ec2 can access it.
- Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
- Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
- Wrote the code to add iam policy for Cloudwatch service
- Attached the policy to the Ec2 role
- Added a command to run the cloudwatch agent in user data script
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Created the infrastructure and tested the application using the domain name
Need to configure the entire infrastructure changes for load balancer, launch template and auto scaling group and its policies.
- Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
- Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
- Wrote the code to add launch template for EC2 instances
- Created a shell script in order to run the user data script and passed it to launch template
- Added and updated security groups for Load balancer and Ec2 instances
- Removed the resource of Ec2 instance
- Configured Auto Scaling group and its policies.
- Added cloudwatch alarms which will trigger the scale up and down policies as per the alarm
- Made updates in the Route53 by adding alias for Load balancer DNS name
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Created the infrastructure and tested the application using the domain name
The assignment was to add ssl certificates for dev and prod environments, encrypt the RDS instance and EBS volumes.
-
Clone the organization's (rishab-csye-6225-cloud-org) aws-infra (main) repository
-
Go to the aws-infra folder first
- Add the dev.tfvars or demo.tfvars file (with all the variables defined) in the root directory
- terraform init
- terraform plan -var-file="file_name.tfvars"
- terraform apply -var-file="file_name.tfvars"
- terraform destroy -var-file="file_name.tfvars"
-
The command to import the certificate is as follows :
- aws acm import-certificate --certificate fileb://prod_rishabagarwal_me.crt --certificate-chain fileb://prod_rishabagarwal_me.ca-bundle --private-key fileb://private.key
- Wrote the code to add KMS keys for both the RDS and EBS volumes
- Created policies for RDS and Ebs volumes and attached it the respective keys
- Made changes to load balancer listener by changing the port from 80 t0 443 and the protocol from HTTP to HTTPS
- Added configuration for SSL certification by attaching it to the load balancer listener
- Worked in the dev profile in order to develop the code
- Ran the terraform commands to run the code
- Created the infrastructure and tested the application using the domain name