Skip to content

Commit 3278675

Browse files
committed
Add role assignments for app insights
1 parent 2519fca commit 3278675

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/terraform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: ./.github/workflows/_terraformApplyTemplate.yml
4141
name: "Terraform Apply"
4242
needs: [terraform_plan_dev]
43-
if: github.event_name == 'push' || github.event_name == 'release'
43+
# if: github.event_name == 'push' || github.event_name == 'release'
4444
with:
4545
environment: "dev"
4646
terraform_version: "1.4.6"

code/infra/logging.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "azurerm_application_insights" "application_insights" {
1010
force_customer_storage_for_profiler = false
1111
internet_ingestion_enabled = true
1212
internet_query_enabled = true
13-
local_authentication_disabled = false
13+
local_authentication_disabled = true
1414
retention_in_days = 90
1515
sampling_percentage = 100
1616
workspace_id = azurerm_log_analytics_workspace.log_analytics_workspace.id

code/infra/roleassignments.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ resource "azurerm_role_assignment" "function_role_assignment_key_vault" {
99
role_definition_name = "Key Vault Secrets User"
1010
principal_id = azapi_resource.function.identity[0].principal_id
1111
}
12+
13+
resource "azurerm_role_assignment" "function_role_assignment_application_insights" {
14+
scope = azurerm_application_insights.application_insights.id
15+
role_definition_name = "Monitoring Metrics Publisher"
16+
principal_id = azapi_resource.function.identity[0].principal_id
17+
}

0 commit comments

Comments
 (0)