Skip to content

Commit 2f39d24

Browse files
committed
add apim logger
1 parent 9501cef commit 2f39d24

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

infra/apim.tf

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,25 +160,16 @@ resource "azurerm_api_management_api_policy" "mtfsz-api-policy" {
160160
XML
161161
}
162162

163-
# resource "azapi_resource" "auth-provider" {
164-
# type = "Microsoft.ApiManagement/service/authorizationProviders@2023-05-01-preview"
165-
# name = "mtfsz"
166-
# parent_id = azurerm_api_management.apim.id
167-
# body = jsonencode({
168-
# properties = {
169-
# displayName = "MTFSZ"
170-
# identityProvider = "oauth2"
171-
# oauth2 = {
172-
# grantTypes = {
173-
# clientCredentials = {
174-
# authorizationUrl = "https://adatbank2.mtfsz.hu/oauth/v2/auth"
175-
# tokenUrl = "https://adatbank2.mtfsz.hu/oauth/v2/token"
176-
# }
177-
# }
178-
# }
179-
# }
180-
# })
181-
# }
163+
resource "azurerm_api_management_logger" "apim-logger" {
164+
name = "pontozo-apim-logger"
165+
api_management_name = azurerm_api_management.apim.name
166+
resource_group_name = azurerm_resource_group.pontozo-rg.name
167+
resource_id = azurerm_application_insights.appinsights.id
168+
169+
application_insights {
170+
instrumentation_key = azurerm_application_insights.appinsights.instrumentation_key
171+
}
172+
}
182173

183174

184175
resource "azurerm_api_management_subscription" "backend-sub" {

0 commit comments

Comments
 (0)