Minimize waste and optimize for joy

Gopher, Open Sourcerer and Terraformer that microblogs.

Calling a Cloud Run service using a service account

If one services wants to communicate with another service in Google Cloud, it’s required to set a “Authorization” header in the request. Ofcourse prior to the above, it’s expected that you configure the receiving service to accept requests from the calling service by making the calling service’s service account a principal on the receiving service. If you’re not setting the “Authorization” header, you’ll likely run in a 403. $ curl -I 10....

September 11, 2022 · 1 min

Retrieve state outputs for a given workspace

I recently discovered that you can use tfe_outputs to extract state outputs from a given Terraform workspace. Using workspace level permissions you can access the state programmatically across different workspaces. data "tfe_outputs" "dns" { organization = "our-example-org" workspace = "dns-workspace" } resource "aws_route53_zone" "dev_example" { name = "dev.example.com" } resource "aws_route53_record" "dev_example" { allow_overwrite = true name = "dev.example.com" ttl = 172800 type = "NS" zone_id = aws_route53_zone.dev_example.zone_id records = [ data....

September 6, 2022 · 1 min

Consistent hashing

Slicing and dicing data There’s many ways to distribute our data over multiple nodes. Some prefer to partition their data vertically instead of horizontally and vice versa. Lets briefly explore the difference to give some of our readers that are new to these concepts an idea of what we are talking about. Horizontal partitioning When you are partitioning a table horizontally we typically refer to the art of dividing a table into subsets of rows that are stored in seperate nodes....

June 3, 2022 · 16 min

What is a container?

In this article I want to provide you with a simple abstract in order for you to discover the container paradigm yourself. We’ll try to answer questions like: what are containers, how are they made and why are they great? The first time I heard about ‘containers’ I thought that containers were very small sized stripped down nodes. Well, I can tell you that’s definitely not the case. First things first, containers are not VMs....

April 21, 2022 · 12 min

Going global with KMS and Secrets Manager

In this post I want to give you a brief introduction on how to deploy KMS keys and secrets in Secret Manager across multiple regions. We’ll do so by making use of replication to minimize waste and prevent repetition. Multi-region KMS key July last year AWS introduced multi-region KMS keys. A new capability that lets you replicate keys from one region into another. With multi-region keys, you can more easily move encrypted data between regions without having to decrypt and re-encrypt with different keys in each region....

January 23, 2022 · 4 min