To run the project, first you need to have aws cli and terraform installed in the system. After that you can continue with the following steps.
-
Configure aws cli using command.
aws configure
AWS CLI will ask for access keys. It can be generated inside aws console in the IAM section.
-
Clone the repository locally.
-
Create a
terraform.tfvars
file and enter the following details.instance_ami = <AMI ID FOR THE TYPE OF INSTANCE YOU WANT TO CREATE> instance_key_name = <ADD KEY NAME FOR THE INSTANCE> database_password = <CHOOSE A PASSWORD FOR ADMIN OF RDS DATABASE>
-
In the project directory run the following command to initialize terraform.
terraform init
You will get few files inside the directory after completion of the command.
-
To check which all resources will be created.
terraform plan
-
To create the resources.
terraform apply
-
To get rid of all the changes.
terraform destroy