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:
- 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.
-
Second need to make output as variable for Key Vault secret value
-
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 {}
}
#Working
resource “azurerm_resource_group” “example” {
name = “my-logicapp-rg”
location = “West Europe”
}
#working
resource “azurerm_logic_app_workflow” “example” {
name = “workflow1”
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}
#working
resource “azurerm_logic_app_trigger_http_request” “example” {
name = “some-http-trigger1”
logic_app_id = azurerm_logic_app_workflow.example.id
schema = <<SCHEMA
{
“type”: “object”,
“properties”: {
“NotificationMessage”: {
“type”: “String”
}
}
}
SCHEMA
}
THIS IS NOT WORKING:
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 = azurerm_key_vault.example.id
#}