Skip to content

Commit

Permalink
Merge pull request #107 from Matthewsre/develop
Browse files Browse the repository at this point in the history
removing continue on error condition for now
  • Loading branch information
Matthewsre authored Jun 22, 2021
2 parents c2c31a8 + dea23a1 commit 220058c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/microservice/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,13 @@ resource "azuread_service_principal" "microservice" {
resource "null_resource" "azuread_service_principal_owners" {
for_each = toset(var.application_owners)

triggers = {
trigger = uuid()
}

provisioner "local-exec" {
command = "az rest -m POST -u '${local.graph_url}/v1.0/servicePrincipals/${azuread_service_principal.microservice.object_id}/owners/$ref' -b \"{'@odata.id': '${local.graph_url}/v1.0/directoryObjects/${each.key}'}\""
command = "az rest -m POST -u '${local.graph_url}/v1.0/servicePrincipals/${azuread_service_principal.microservice.object_id}/owners/$ref' -b \"{'@odata.id':'${local.graph_url}/v1.0/directoryObjects/${each.key}'}\""
interpreter = ["PowerShell", "-Command"]
on_failure = continue // Ignore already exists errors
}
}
Expand Down

0 comments on commit 220058c

Please sign in to comment.