This is a terraform project which provisions a infrastructure for deploying Sinatra with Sequel to Google Cloud Platform (GCP).
This was created as part of a GCP learning project. The goal was to deploy a simple web application with a database. And along the way, appreciate the differences between AWS and GCP.
- Terraform
- You will need basic Terraform knowledge. Eg. Usage of
fmt
,init
,validate
andapply
commands
- You will need basic Terraform knowledge. Eg. Usage of
- Create a service account on your GCP project
- Download the JSON key for the service account. There is likely a better (and safer) way to do this. I do not recommend that you put the key file in the project directory, to avoid committing the key by accident.
- Run
cp .secret.tfvars.template .secret.tfvars
. This file contains values that specific to your project. - Update the values in
.secret.tfvars
accordingly.
Run terraform apply -var-file="secret.tfvars"