Skip to content

Instantly share code, notes, and snippets.

@arslanbekov
Created November 24, 2022 16:34
Show Gist options
  • Save arslanbekov/39faeeb57f27872ddd884461b798d446 to your computer and use it in GitHub Desktop.
Save arslanbekov/39faeeb57f27872ddd884461b798d446 to your computer and use it in GitHub Desktop.
resource "google_iam_workload_identity_pool_provider" "github_actions" {
provider = google-beta
project = "my-gcp-project"
workload_identity_pool_id = google_iam_workload_identity_pool.github_actions.workload_identity_pool_id
workload_identity_pool_provider_id = "github-actions"
display_name = "GitHub Actions provider"
description = "Workload Identity Pool Provider managed by Terraform"
attribute_condition = "attribute.repository_owner==\"arslanbekov\""
attribute_mapping = {
"google.subject" = "assertion.sub"
"attribute.actor" = "assertion.actor"
"attribute.aud" = "assertion.aud"
"attribute.repository" = "assertion.repository"
"attribute.repository_owner" = "assertion.repository_owner"
}
oidc {
allowed_audiences = []
issuer_uri = "https://token.actions.githubusercontent.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment