Skip to content

Instantly share code, notes, and snippets.

@inbinder
inbinder / gist:86f41216b1463aeb7958df38a40f5312
Last active November 5, 2024 13:53
Demo of assuming roles so that your Gitlab runner etc can use one account and assume roles and privileges in others
data "aws_caller_identity" "current" {}
locals {
builder_account_id = "000000000001" # Where the Builder agents run
infra_account_id = "000000000002" # Where stuff gets built
distro_account_id = "000000000003" # Where stuff gets built
}
resource "aws_iam_role" "terraform_role" {