Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion gcp/workload-identity-federation-direct.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "google_iam_workload_identity_pool_provider" "github_provider" {
workload_identity_pool_provider_id = "ambient-code-github-actions"
display_name = "ambient-code GitHub Actions"

attribute_condition = "assertion.repository in ['ambient-code/platform', 'ambient-code/opentofu']"
attribute_condition = "assertion.repository in ['ambient-code/platform', 'ambient-code/opentofu', 'ambient-code/pull-reviews']"

attribute_mapping = {
"google.subject" = "assertion.sub"
Expand All @@ -57,6 +57,14 @@ resource "google_project_iam_member" "github_vertex_ai_access" {
member = "principalSet://iam.googleapis.com/${google_iam_workload_identity_pool.github_pool.name}/attribute.repository/ambient-code/platform"
}

# Grant Vertex AI User role to the ambient-code/pull-reviews repository
# for AI-powered PR video review generation using Claude on Vertex.
resource "google_project_iam_member" "pull_reviews_vertex_ai_access" {
project = var.project_id
role = "roles/aiplatform.user"
member = "principalSet://iam.googleapis.com/${google_iam_workload_identity_pool.github_pool.name}/attribute.repository/ambient-code/pull-reviews"
}

# Outputs
output "workload_identity_pool_id" {
description = "The ID of the Workload Identity Pool"
Expand Down
Loading