How to fetch LogicApps URL as output and store as Key Vault Secret?

I have Azure Data Factory which has Web Activity to Post json to Azure LogicApps. (ADF Web->Logic Apps)
URL of LogicApps HTTP Trigger are created in the moment of creation of LogicApps.

This is what I want:

  1. I would like to create LogicApps with Terraform.(this is working)
    Then fetch URL And provide URL as variable when ADF are created with ARM on Azure Pipeline Release.

I’m getting error: A managed resource “some-http-trigger” “logic_app_get_url” has not been declared in the root module.

  1. Second need to make output as variable for Key Vault secret value

  2. Then store URL variable to Key Vault Secret so that Azure Data Factory

Define Terraform provider

terraform {
required_version = “>= 0.12”

Configure the Azure provider

provider “azurerm” {
environment = “public”
version = “>= 2.0.0”
features {}

resource “azurerm_resource_group” “example” {
name = “my-logicapp-rg”
location = “West Europe”

resource “azurerm_logic_app_workflow” “example” {
name = “workflow1”
location = azurerm_resource_group.example.location
resource_group_name =

resource “azurerm_logic_app_trigger_http_request” “example” {
name = “some-http-trigger1”
logic_app_id =

schema = <<SCHEMA
“type”: “object”,
“properties”: {
“NotificationMessage”: {
“type”: “String”



output “logic_app_get_url” {
value = some-http-trigger.logic_app_get_url
description = “fetch url of HTTP Trigger of LogicApp”

#How to set output as variable for key vault secret value?

#Key vault is already created with another TF script. Instance Name is "My-Key-Vault. How to reference to key vault instance?
#resource “azurerm_key_vault_secret” “example” {
#name = “secret-sauce”
#value = “szechuan”
#key_vault_id =