Share via

Container App Environment - patch appLogsConfiguration fails with LogAnalyticsConfiguration is invalid

Kenny Kawahara 61 Reputation points
2024-08-02T04:33:05.86+00:00

I am deploying a container app environment using OpenTofu. The azurerm provider does not currently have a means to set the Logging Option to a log analytics workspace, so I am attempting to to use the azapi_resource_action resource to PATCH the resource using the below.

resource "azapi_resource_action" "azapi_patch_monitoring_options" {
    type = "Microsoft.App/managedEnvironments@2024-03-01"
  resource_id = azurerm_container_app_environment.cae.id
  method = "PATCH"
  body = jsonencode({
    properties = {
      appLogsConfiguration = {
        destination = "log-analytics"
        logAnalyticsConfiguration = {
          customerId = "
Community Center | Not monitored
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.