Activity 2 AWS infra continued
- Lets create an ec2 instance with ami-id
ami-0892d3c7ee96c0bf7
- We have already created a security group and we would like to use the existing key pair
fortf
- Refer Here for the terraform ec2 resource
- Created the ec2 instance. Refer Here for the terraform changes.
- Now lets try to login into the ec2 instance create
- Now for public connectivity, lets create an internet gateway and attach it to the vpc
- Refer Here for the internet gateway resource
- To create route tables Refer Here
- Now we need to associate route tables to subnets Refer Here
- After making the changes as mentioned Refer Here, We are able to login into ec2 instance created
- We would need to deploy an application inside this ec2 instance. Which we will be doing very soon.
- We would like to create an database instance in our vpc hosting some database.
- In this exercise, lets try to create an Postgres Database in free tier.
- Manual Steps:
- From the images we can make out that the following are the major inputs
- Engine => postgres/mysql/oracle/sql server
- version => which version of database
- Dbsubnet group =>
- network => vpc, subnet & security group
- instance size => db.t2.micro
- Credentials
- other settings
- for backups
- monitoring
- storage size