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.58k stars 4.62k forks source link

Support for azurerm_logic_app_trigger_http_request data resource #18866

Open cveld opened 2 years ago

cveld commented 2 years ago

Is there an existing issue for this?

Community Note

Description

Through the azapi provider we provision a logic app workload including an http trigger. We would like to store the callback url into a key vault secret.

As a workload around we have to add a azurerm_logic_app_trigger_http_request resource:

resource "azurerm_logic_app_trigger_http_request" "httprequest" {
  logic_app_id        = azapi_resource.logicapp.id
  name                = "manual"
  schema = jsonencode({})
}

which yields azurerm_logic_app_trigger_http_request.httprequest.callback_url. But this requires a roundtrip import statement of the existing trigger deployed by azapi.

Better workaround found through azapi:

data "azapi_resource_action" "logicapp_callbackurl" {
  resource_id = "${azapi_resource.logicapp.id}/triggers/manual"
  action = "listCallbackUrl"
  type = "Microsoft.Logic/workflows/triggers@2018-07-01-preview"
  depends_on = [
    azapi_resource.logicapp
  ]
  response_export_values = ["value"]
}

Ideally we would like to see a data resource with which we can pull the callback url.

New or Affected Resource(s)/Data Source(s)

azurerm_logic_app_trigger_http_request

Potential Terraform Configuration

data "azurerm_logic_app_trigger_http_request" "httprequest" {
  logic_app_id        = azapi_resource.logicapp.id
  name                = "manual"
}

References

No response

KenticoMartinS commented 11 months ago

Hi, we have also encountered this issue and having a native data source for the azurerm_logic_app_trigger_http_request would be really appreciated as we don't want to use workarounds.

Is there any estimate of when or whether this will be implemented?