hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.47k stars 4.55k forks source link

`azurerm_sentinel_automation_rule` should support Logic App Standard #22381

Open Lu-Ka opened 1 year ago

Lu-Ka commented 1 year ago

Is there an existing issue for this?

Community Note

Terraform Version

1.5.2

AzureRM Provider Version

3.63.0

Affected Resource(s)/Data Source(s)

azurerm_sentinel_automation_rule

Terraform Configuration Files

resource "azurerm_sentinel_automation_rule" "create_ticket" {
  name                       = random_uuid.create_ticket.result
  log_analytics_workspace_id = data.terraform_remote_state.sentinel.outputs.log_analytics_workspace_id
  display_name               = "Create-Ticket"
  order                      = 10

  triggers_on   = "Incidents"
  triggers_when = "Created"

  condition_json = jsonencode([{
    conditionProperties : {
      operator : "NotEquals",
      propertyName : "IncidentStatus",
      propertyValues : [
        "Closed"
      ]
    },
    conditionType : "Property"
  }])

  action_playbook {
    order        = 1
    logic_app_id = "/subscriptions/xxxxx/resourceGroups/xxxxx/providers/Microsoft.Web/sites/lapp-playbook/workflows/Create-Ticket"
    tenant_id    = var.azure_tenant_id
  }
}

Debug Output/Panic Output

https://gist.github.com/Lu-Ka/5c4bb7ee8c4be757faf63df570952461

Expected Behaviour

logic_app_id variable in action_playbook block should support workflow ID from Logic App Standard.

We can configure this kind of Logic App via the portal, there is no bug.

Actual Behaviour

logic_app_id variable accepts only Logic App Consumption ID where in the path it contains "Microsoft.Logic". But in our case the path/the provider is coming from an App Service with a Logic App Standard workflow.

Steps to Reproduce

No response

Important Factoids

No response

References

No response

simschere commented 6 months ago

Would be nice indeed