From f5f7e317b9d73105252015e185d029adbdb5acbf Mon Sep 17 00:00:00 2001 From: Ian Knighton Date: Mon, 23 Sep 2024 09:30:07 -0600 Subject: [PATCH] chore: move fixes to this repo --- main.tf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index 58ac7da..3cbd01b 100644 --- a/main.tf +++ b/main.tf @@ -8,7 +8,6 @@ terraform { source = "hashicorp/google-beta" version = "~> 4.76" } - random = { source = "hashicorp/random" version = "3.4.3" @@ -45,14 +44,16 @@ resource "google_iam_workload_identity_pool_provider" "oidc_provider" { workload_identity_pool_id = google_iam_workload_identity_pool.pool.workload_identity_pool_id workload_identity_pool_provider_id = "${google_service_account.service_account.account_id}-provider" attribute_mapping = { - "google.subject" = "assertion.sub", - "attribute.actor" = "assertion.actor", - "attribute.repository" = "assertion.repository" + "google.subject" = "assertion.sub", + "attribute.actor" = "assertion.actor_id", + "attribute.repository" = "assertion.repository", + "attribute.repository_id" = "assertion.repository_id", + "attribute.repository_owner" = "assetion.repository_owner", + "attribute.repository_owner_id" = "assertion.repository_owner_id", } oidc { issuer_uri = "https://token.actions.githubusercontent.com" } - project = var.project } resource "google_service_account_iam_member" "workload_identity_pool_iam" {