Skip to content

IaC & GCP:The ways of the world!


Published At: Sunday, August 6, 2023 at 8:53 AM

alt text

Idea

Recently I had the bright idea that even though I haven't used IaC properly yet, I can roll out my own better IaC solution! Basially, Write TS code for managing infra instead of terraform files!

This was inspired by AWS SST, investigated further, and implementing seemed a pain. Also compared with alternativs, and best current solutions seems to be using terraform (hcl).

Existing Solutions

a. Google deployment manager

+ive-ive
well integrated with Google Cloudgcp specific
yaml config, not a fan
no native lang bindings

b. Pulimi

+ive-ive
multiple lang bindingsbad support for gcp resources (looks good for aws)
looks easy to use

c. AWS SST

+ive-ive
great for aws sstnot possible to use with gcp

d. Terraform CDKTF

+ive-ive
seems to have better support than pulini for gcp resourcestooling experience was painful and slow
native bindings for multiple lang

e. Terraform (HCL config)

+ive-ive
good support within GCP docslearning a new DSL is annoying
seems to be the current mainstream standard in devOpsmanaging state is a pain, need to use gcp cloud storage buckets (recommended in gcp docs) or terraform managed cloud
export from gcloud gcloud beta resource-config bulk-export --resource-format=terraform >> gcp_resources.tf