Skip to content

Commit

Permalink
Updating Terraform Azure Service Principal PRIME-ReportStream-Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
emvaldes committed Jan 9, 2025
1 parent ed22782 commit 35d40af
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion operations/app/terraform/modules/init/key_vault.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ resource "azurerm_key_vault_access_policy" "init_tf" {
key_vault_id = azurerm_key_vault.init[each.value].id
tenant_id = data.azurerm_client_config.current.tenant_id
// terraform-automation 5ab367bf-df15-45af-a027-47f95f2c75d8
object_id = "4d81288c-27a3-4df8-b776-c9da8e688bc7"
object_id = "{active_account}"

key_permissions = [
"Create",
Expand Down
2 changes: 1 addition & 1 deletion operations/app/terraform/vars/demo/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ locals {
tf_secrets_vault = "pdh${local.init.environment}-keyvault${local.init.random_id}"
}
ad = {
terraform_object_id = "4d81288c-27a3-4df8-b776-c9da8e688bc7"
terraform_object_id = "{active_account}"
aad_object_keyvault_admin = "3c17896c-ff94-4298-a719-aaac248aa2c8"
aad_group_postgres_admin = "f94409a9-12b1-4820-a1b6-e3e0a4fa282d"
}
Expand Down
2 changes: 1 addition & 1 deletion operations/app/terraform/vars/prod/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {
tf_secrets_vault = "pdh${local.init.environment}-keyvault"
}
ad = {
terraform_object_id = "4d81288c-27a3-4df8-b776-c9da8e688bc7"
terraform_object_id = "{active_account}"
aad_object_keyvault_admin = "5c6a951e-a4c2-4890-b62c-0ed8179501bb"
aad_group_postgres_admin = "c4031f1f-229c-4a8a-b3b9-23bae9dbf197"
}
Expand Down
2 changes: 1 addition & 1 deletion operations/app/terraform/vars/staging/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {
tf_secrets_vault = "pdh${local.init.environment}-keyvault"
}
ad = {
terraform_object_id = "4d81288c-27a3-4df8-b776-c9da8e688bc7"
terraform_object_id = "{active_account}"
aad_object_keyvault_admin = "b35a2a63-aeb2-438c-913b-bebeb821adfe"
aad_group_postgres_admin = "c4031f1f-229c-4a8a-b3b9-23bae9dbf197"
}
Expand Down
2 changes: 1 addition & 1 deletion operations/app/terraform/vars/test/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ locals {
tf_secrets_vault = "pdh${local.init.environment}-keyvault"
}
ad = {
terraform_object_id = "4d81288c-27a3-4df8-b776-c9da8e688bc7"
terraform_object_id = "{active_account}"
aad_object_keyvault_admin = "3c17896c-ff94-4298-a719-aaac248aa2c8"
aad_group_postgres_admin = "f94409a9-12b1-4820-a1b6-e3e0a4fa282d"
}
Expand Down
4 changes: 2 additions & 2 deletions prime-router/docs/docs-deprecated/environment-provisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ echo "init complete"
# Import access polices that are shared with init and key_vault modules
terraform -chdir=$path import -var-file=$env/env.tfvars.json \
module.key_vault.azurerm_key_vault_access_policy.terraform_app_config_access_policy[0] \
"/subscriptions/7d1e3999-6577-4cd5-b296-f518e5c8e677/resourceGroups/prime-data-hub-$env/providers/Microsoft.KeyVault/vaults/pdh$env-appconfigmt8/objectId/4d81288c-27a3-4df8-b776-c9da8e688bc7"
"/subscriptions/7d1e3999-6577-4cd5-b296-f518e5c8e677/resourceGroups/prime-data-hub-$env/providers/Microsoft.KeyVault/vaults/pdh$env-appconfigmt8/objectId/{active_account}"
terraform -chdir=$path import -var-file=$env/env.tfvars.json \
module.key_vault.azurerm_key_vault_access_policy.terraform_access_policy[0] \
"/subscriptions/7d1e3999-6577-4cd5-b296-f518e5c8e677/resourceGroups/prime-data-hub-$env/providers/Microsoft.KeyVault/vaults/pdh$env-keyvaultmt8/objectId/4d81288c-27a3-4df8-b776-c9da8e688bc7"
"/subscriptions/7d1e3999-6577-4cd5-b296-f518e5c8e677/resourceGroups/prime-data-hub-$env/providers/Microsoft.KeyVault/vaults/pdh$env-keyvaultmt8/objectId/{active_account}"
for i in {1..3}; do \
terraform -chdir=$path apply \
Expand Down

0 comments on commit 35d40af

Please sign in to comment.