Skip to content

Commit

Permalink
chore: add enviroment subject to federated credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
larwaa committed Jul 14, 2023
1 parent 034a2de commit 60c622c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions infrastructure/shared_resources/service_principal.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ resource "azuread_application_federated_identity_credential" "github_branch_main
subject = "repo:rubberdok/${var.repository_name}:ref:refs/heads/main"
}

resource "azuread_application_federated_identity_credential" "github_environment_production" {
application_object_id = azuread_application.github.object_id
display_name = "github-environment-production"
description = "GitHub Actions Service Principal"
audiences = ["api://AzureADTokenExchange"]
issuer = "https://token.actions.githubusercontent.com"
subject = "repo:rubberdok/indok-api:environment:production"
}

resource "azuread_application_federated_identity_credential" "github_pull_request" {
application_object_id = azuread_application.github.object_id
display_name = "github-pull-request"
Expand Down

0 comments on commit 60c622c

Please sign in to comment.