Skip to content

Commit

Permalink
fix: Federated identity subject (#299)
Browse files Browse the repository at this point in the history
* federated identity fix subject

* ref
  • Loading branch information
jacopocarlini authored May 28, 2024
1 parent f66a8ce commit 56bc304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github_federated_identity/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ resource "azurerm_federated_identity_credential" "identity_credentials" {
audience = each.value.audience
issuer = each.value.issuer
parent_id = azurerm_user_assigned_identity.identity.id
subject = "repo:${each.value.org}/${each.value.repository}:${each.value.credentials_scope}:${each.value.subject}"
subject = each.value.subject == "pull_request" ? "repo:${each.value.org}/${each.value.repository}:${each.value.subject}" : "repo:${each.value.org}/${each.value.repository}:${each.value.credentials_scope}:${each.value.subject}"
}

0 comments on commit 56bc304

Please sign in to comment.