Skip to content

Instantly share code, notes, and snippets.

kevinbi@test-dual-stack:~$ sudo groupadd -f docker
kevinbi@test-dual-stack:~$ sudo usermod -aG docker $USER
kevinbi@test-dual-stack:~$ newgrp docker
kevinbi@test-dual-stack:~$ sudo systemctl start docker
kevinbi@test-dual-stack:~$ docker run --name python -it --rm python:3.12.8-bullseye /bin/bash
Unable to find image 'python:3.12.8-bullseye' locally
3.12.8-bullseye: Pulling from library/python
478cb7364610: Pull complete
f0388f0d5bf1: Pull complete
5d473f760e53: Pull complete
kevinbi@test-dual-stack:~$ sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 InRelease
Hit:5 https://apt.llvm.org/jammy llvm-toolchain-jammy-16 InRelease
Get:7 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Hit:8 https://apt.repos.intel.com/oneapi all InRelease
Fetched 129 kB in 1s (190 kB/s)
@kev-bi
kev-bi / workload-identity-federation.md
Created January 12, 2025 06:11
GCP service account to AWS IAM role federation for terraform aws provider

GCP service account to AWS IAM role federation for aws terraform provider

On the off chance you have GCP workloads (i.g. GCE VMs or Cloud Run services) that need to apply terraform templates to create resources in an AWS account you can do so by fetching an identity token from the metadata server and using the token for workload identity federation.

Prereqs

This assumes your Cloud Run service or GCE VM already has a service account assigned.

Steps