Evaluation of the Always-free tier on Google Cloud
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
terraform
.gitignore
.travis.yml
LICENSE
README.md

README.md

Google Cloud Free Tier Playground

Build Status

This project has everything you need to bootstrap a working environment on Google Cloud. It only uses resources available in the "Always-free" tier. The whole environment is provisioned with Terraform.

Here is the related blog post: https://ferrarimarco.info/blog/cloud/2018/05/09/google-cloud-engine-free-terraform/

Dependencies

  • Terraform >= 0.11.7 (may work with older versions, not tested)

Initialization

  1. Install Terraform
  2. Configure the credentials file by following this guide and save it in the terraform directory
  3. Generate a private/public keypair to use for SSH connections (Terraform does not yet support OS-Login). You can follow this GitHub guide. Save both files under ~/.ssh/id_rsa_gcloud and ~/.ssh/id_rsa_gcloud.pub

Run Terraform Configurations

Run the following commands from the terraform directory

  1. Create a bucket in Google Cloud Storage to store Terraform state, keeping track of the choosen id
  2. Ensure that the service account you are using has r/w access to the newly created bucket
  3. Initialize the Terraform environment (from the terraform directory): terraform init
    1. When prompted, insert the storage bucket ID created in previous step
    2. When prompted, insert the required values. If you don't want to input these values every time, use a tfvars file
  4. Apply Terraform configurations: terraform apply

Provisioned Resources

  1. Google Compute Engine:
    1. 1x f1.micro VM (us-east1 region) with 30GB of disk space, SSH-accessible (via a public IP)