Cloudformation (Contd..)
- Current state of template
- Now lets add a database which is rds mysql
- db instance type: db.t2.micro
- db storage size: 20 GB
- db backup retention: 0 days
- RDS Activities
- Create a db subnet group Refer Here
- With the changes done for subnet group create a changeset and execute the changeset to apply on the stack
- Refer Here for dbsubnet changes
- Now lets create a rds database as mentioned above Refer Here for cf syntax
- The changes made are over here
- Lets create an ec2 instance for the app tier with tomcat installed
- Creating ec2 instance from cloud formation Refer Here
- For today lets hardcode image id (This makes our template work only in mumbai region)
- We have our first draft version, which creates a ec2 instance and install tomcat server, but we need do the following
- Ensure ubuntu 18 ami is selected for all regions
- Ensure app subnet is selected
- Create a security group for app subnet and attach it
- The current changes are available over here