如何通过Terraforn设置Azure Web应用程序防火墙(WAF)日志?
我正试图通过地形代码做到这一点:如何通过Terraforn设置Azure Web应用程序防火墙(WAF)日志?,azure,terraform,terraform-provider-azure,azure-waf,Azure,Terraform,Terraform Provider Azure,Azure Waf,我正试图通过地形代码做到这一点: 然而,我却找不到如何。它是某种模糊的资源还是根本没有实现?Terraform for Azure WAF(ApplicationGateway)似乎还不支持日志 您可以使用来配置设置,正如ydaetskcoR所说,它的工作原理与您提供的屏幕截图所示。下面是示例代码: resource "azurerm_monitor_diagnostic_setting" "example" { name = "example" targe
然而,我却找不到如何。它是某种模糊的资源还是根本没有实现?Terraform for Azure WAF(ApplicationGateway)似乎还不支持日志 您可以使用来配置设置,正如ydaetskcoR所说,它的工作原理与您提供的屏幕截图所示。下面是示例代码:
resource "azurerm_monitor_diagnostic_setting" "example" {
name = "example"
target_resource_id = "application_gateway_resource_id"
storage_account_id = data.azurerm_storage_account.example.id
log {
category = "ApplicationGatewayFirewallLog"
enabled = true
retention_policy {
enabled = true
days = 30
}
}
}
Terraform不支持应用程序网关的数据,因此您需要自己输入现有应用程序网关的资源id,或者在创建新的应用程序网关时引用id 你看过吗?