• Stars
    star
    144
  • Rank 254,366 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 8 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Script to convert Logic Apps into templates for deployment

Logic App Template Creator Script

This is a simple PowerShell script module I wrote to convert Logic Apps into a template that can be included in a deployment.

How to use

  1. Clone the project, open, and build.
  2. Open PowerShell and Import the module: Import-Module C:\{pathToSolution}\LogicAppTemplateCreator\LogicAppTemplate\bin\Debug\LogicAppTemplate.dll
  3. Run the PowerShell command Get-LogicAppTemplate. You can pipe the output as needed, and recommended you pipe in a token from armclient armclient token 80d4fe69-xxxx-4dd2-a938-9250f1c8ab03 | Get-LogicAppTemplate -LogicApp MyApp -ResourceGroup Integrate2016 -SubscriptionId 80d4fe69-xxxx-4dd2-a938-9250f1c8ab03 -Verbose | Out-File C:\template.json

Example when user is connected to multitenants: Get-LogicAppTemplate -LogicApp MyApp -ResourceGroup Integrate2016 -SubscriptionId 80d4fe69-xxxx-4dd2-a938-9250f1c8ab03 -TenantName contoso.onmicrosoft.com

Example with diagnostic settings: Get-LogicAppTemplate -LogicApp MyApp -ResourceGroup Integrate2016 -SubscriptionId 80d4fe69-xxxx-4dd2-a938-9250f1c8ab03 -DiagnosticSettings

How to use (via Powershell Gallery)

  1. Open a Powershell session / console.
  2. Open PowerShell and Import the module(s):
Install-Module Az.Accounts -Force #Only if you don't if you have it or not, it is safe to run when in doubt
Import-Module Az.Accounts
Install-Module LogicAppTemplate -Force
Import-Module LogicAppTemplate
#Ensure that you are signed into an account with enough permissions
Login-AzAccount
  1. Run the PowerShell command Get-LogicAppTemplate.
$token = Get-AzAccessToken -ResourceUrl "https://management.azure.com" | Select-Object -ExpandProperty Token
Get-LogicAppTemplate -LogicApp MyApp -ResourceGroup Integrate2016 -SubscriptionId 80d4fe69-xxxx-4dd2-a938-9250f1c8ab03 -Token $token -Verbose | Out-File C:\template.json

Important Change 2019-08-09

There has been a change from previous version on parameters that where Boolean are now SwitchParameter there will be an error when you run it the first time. Error is easy fixed, in your script just remove the $true part in your command se example bellow:

 -DiagnosticSettings $true 

To:

-DiagnosticSettings

Updates Change 2020-05-06

There has been alot of small changes and contribution around extraction of connectors, Integration Account and nested templates. New is that service bus connector now comes out with inputs needed for Azure Resource Manager to create the connection string rather than providing it manually.

Specifications

Parameter Description Required
LogicApp The name of the Logic App true
ResourceGroup The name of the Resource Group true
SubscriptionId The subscription Id for the resource true
TenantName Name of the Tenant i.e. contoso.onmicrosoft.com false
Token An AAD Token to access the resources - should not include Bearer, only the token false
ClaimsDump A dump of claims piped in from armclient - should not be manually set false
DiagnosticSettings If supplied, diagnostic settings are included in the ARM template false
IncludeInitializeVariable If supplied, Initialize Variable actions will be included in the ARM template false
FixedFunctionAppName If supplied, the functionApp gets a static name false
GenerateHttpTriggerUrlOutput If supplied, generate an output variable with the http trigger url. false
StripPassword If supplied, the passwords will be stripped out of the output false
DisabledState If supplied, the LA ARM Template will be set to Disabled and won't be automatically run when deployed false
ForceManagedIdentity If supplied, Managed Identity for the Logic App will be set in the ARM template false
DisableConnectionGeneration If supplied, Connections for the Logic App will not be output in the ARM template false
DisableTagParameters If supplied, Tags are not parameterized for the Logic App will not be output in the ARM template false
IncludeEvaluatedRecurrence If supplied, EvaluatedRecurrence is added in the ARM template, this is a non documented object false
DisableFunctionNameParameters If supplied, FunctionNames are not parameterized for the Logic App will not be output in the ARM template false
SkipOauthConnectionAuthorization If supplied, Oauth Connections Authorization are not set in the ARM template false
UseServiceBusDisplayName If supplied, the ServiceBusDisplayNames is used within the parameters in the ARM template false
OnlyParameterizeConnections If supplied, the connections are generated with paramters only, no listkeys or other functions is added in the connection object false

After extraction a parameters file can be created off the LogicAppTemplate. (works on any ARM template file):

Get-ParameterTemplate -TemplateFile $filenname | Out-File 'paramfile.json'

For extraction with KeyVault reference mockup links created use: (only static reference)

Get-ParameterTemplate -TemplateFile $filenname -KeyVault Static | Out-File $filennameparam

Specifications

Parameter Description Required
TemplateFile File path to the template file true
KeyVault Enum describing how to handle KeyVault possible values Static Noce, default None false
GenerateExpression Whether to generate parameters whose default value is an ARM expression. If not specified then will not generate parameters per original code false

Other supported commands:

  • Get-IntegrationAccountSchemaTemplate: extract a schema from an integration account
  • Get-IntegrationAccountMapTemplate: extract a map from an integration account
  • Get-CustomConnectorTemplate: extract a custom connector

More Repositories

1

functions-csharp-eventhub-ordered-processing

Example of processing events in order with the Azure Functions Event Hubs trigger
C#
67
star
2

functions-test-helper

Examples and helper class for running Azure Functions unit tests and integration tests
C#
50
star
3

functions-node-ring-doorbell

Azure Function to monitor a ring.com doorbell and emit an event to Azure Event Grid
JavaScript
48
star
4

container-apps-dotnet-eventing

Azure Container App sample for building event driven containers using Azure Service Bus and Azure Event Hubs
Bicep
45
star
5

functions-durable-actor-circuitbreaker

C#
30
star
6

functions-csharp-entityframeworkcore

C# Function that uses dependency injection and entity framework core with Azure SQL
C#
29
star
7

BotFrameworkSample

Bot Framework project I completed that hosts a bot to interface with Visual Studio Team Services. Uses Logic Apps to complete the tasks, and Azure Directory Authentication
C#
29
star
8

functions-test-samples

A series of samples of unit tests and more for Azure Functions
Java
25
star
9

functions-chsarp-entitycore-3

Using Entity Framework on v3
C#
25
star
10

functions-csharp-entities-grimreaper

Durable Entity that monitors created Azure Resources and will clean them up after a period of time. Can extend expiration date via SMS messaging.
C#
22
star
11

grpc-sample-dotnet

.NET application of a gRPC client and server, built for Azure Container Apps
C#
17
star
12

functions-durable-csharp-bittrex-watcher

Azure Function to monitor the price of coins on Bittrex and notify via SMS when a threshold is crossed. Leverages Azure Durable Functions to orchestrate the execution.
C#
17
star
13

functions-long-running-logicapps

Sample of different ways to call Azure Functions which may be longer than 2 minutes from Azure Logic Apps
C#
14
star
14

functions-csharp-servicebus-sessions

Azure Function that triggers on session-enabled service bus queue and appends a list in Redis to validate ordered processing
C#
13
star
15

serverless-tutorial-deployment

Part of the Channel 9 walkthrough on deploying serverless applications
PowerShell
13
star
16

LogicAppsAsyncResponseSample

Sample of how to do an HTTP Async Response pattern to work with Azure Logic Apps
JavaScript
13
star
17

azurefunctions-vsonline

Shell
10
star
18

functions-powershell-grimreaper

PowerShell Azure Function that wakes up every night at midnight PDT and delete all the resource groups I created as a temporary resource
PowerShell
8
star
19

retry-design

C#
8
star
20

functions-csharp-todo-auth

C#
7
star
21

functions-javascript-queue-vs-event

Sample project to showcase difference in injestion rates for queues and event streams
JavaScript
7
star
22

functions-net5-entityframework

C#
6
star
23

serverless-website-demo

Demo to showcase a PR process powered by Azure Serverless architecture
Vue
6
star
24

containerapps-acmebot

Automated ACME (Let's Encrypt) SSL/TLS certificates issuer for Azure Container Apps
C#
6
star
25

azure-functions-dapr-extension

C#
5
star
26

typescriptRestifyAPI

Sample Restify API with Typescript
TypeScript
5
star
27

docdb-connector

Azure DocumentDB Connector for Logic Apps
TypeScript
5
star
28

TeamFoundationAPIApp

API App for create item in Team Foundation Server for Logic Apps
C#
5
star
29

functions-csharp-queue-exponential

Example of doing exponential backoff for queue triggered functions
C#
5
star
30

functions-csharp-sqlconnection

Simple example of using SQLConnection with Azure Functions
C#
5
star
31

shopathome

TypeScript
4
star
32

CSVtoJSON

C#
4
star
33

LogicAppTriggersExample

Example of Poll and Push (Webhook) triggers in Logic Apps
C#
4
star
34

integration-bootcamp-2017

Tutorials for Azure Integration Bootcamp 2017
C#
4
star
35

functions-multiple-queue-exponential

Examples of writing exponential retries of Service Bus queues with Azure Functions
Java
4
star
36

functions-vsts-sample-javascript

Simple function for VSTS sample
JavaScript
3
star
37

serverless-tutorial-functions

Part of the Channel 9 walkthrough on deploying serverless applications
HTML
3
star
38

vue-shop-demo

Fork of Sarah Drasner Stripe payments sample
Vue
3
star
39

container-app-demo

3
star
40

functions-csharp-sentimentcategory

Simple Azure Function that gets a double and returns a category
C#
3
star
41

nextjs-retail-site

JavaScript
3
star
42

functions-csharp-csv-to-json

C#
3
star
43

MSHealthAPI

Microsoft Health API App for Azure Logic Apps
C#
3
star
44

aca-dapr-azurestorage

PowerShell
3
star
45

grpc-sample-python

Python application of a gRPC client and server, built for Azure Container Apps
Python
3
star
46

functions-csharp-durable-store-stripe

Sample function backend to process stripe payments based off of the Sarah Drasner stripe.js post
C#
3
star
47

functions-csharp-durable-iot

Sample demo of using Durable Functions to orchestrate something like an IoT workflow
C#
3
star
48

functions-eventgrid-license-plate-sample

Sample created for the Event Grid webcast to process license plate images with cognitive services.
C#
3
star
49

swa-vue-basic

HTML
3
star
50

funcionts-csharp-entities-circuitbreaker

Durable stateful entity that will keep the status of a circuit. When a function fails it can send a signal to the circuit actor which can decide if circuit is healthy or not
C#
3
star
51

snowpark-cicd-pipeline

Python
2
star
52

functions-csharp-entities-counter

C#
2
star
53

aca-minimal-api

.NET Minimal API with steps on how to publish to Azure Container Apps
C#
2
star
54

hollan-io-site

Static website powered behind the scenes by Azure Functions for hollan.io
CSS
2
star
55

functions-csharp-actor-confsession

C#
2
star
56

nuxt-vue-express-simple-form

Very simple form that pushes a message to a queue
Vue
2
star
57

use-iot-sample

Python
2
star
58

build-demo-walkthrough

2
star
59

functions-csharp-serilog

C#
2
star
60

BandEventHubDemo

C#
2
star
61

functions-csharp-eventhub-sql

Sample using Sql with Event Hubs
C#
2
star
62

keda-triggerauth-samples

2
star
63

functions-csharp-appmap-orders

Demo of using Azure Application Insights with Azure Functions to show the AppMap dependencies of queue chaining
C#
2
star
64

functions-csharp-cosmosdb-di

C#
2
star
65

nodejs-microservice

Bundle that creates a node.js microservice powered by web APIs, functions, and workflows.
Dockerfile
2
star
66

functions-csharp-keyvault-encrypt-blobs

C# Azure Function that will trigger on HTTP with a query parameter of `container`, and go and encrypt all files in that container with a generated and also encrypted key (encrypted via key vault)
C#
2
star
67

functions-ts-kafka-twitter

Example of a typescript function triggering on Kafka
TypeScript
1
star
68

functions-durable-activityload

C#
1
star
69

BizTalkBot

C#
1
star
70

functions-java-cosmos-changefeed

Sample of a Java function with an HTTP trigger and Cosmos Output and corresponding Cosmos change feed trigger
Java
1
star
71

functions-python-cosmos-crypto

Python
1
star
72

functions-csharp-kafka-test

C#
1
star
73

functions-csharp-iotedge-http

Example of an IoT Edge function running an HTTP function on Port 80
C#
1
star
74

serverless-lambda-flask-api

aws-python-flask-api-project
Python
1
star
75

azure-functions-porter

Java
1
star
76

java-perf-test

Java
1
star
77

functions-python-textblob-sentiment

Python
1
star
78

build-2020-eventdriven

C#
1
star
79

snowflake-git-sample

A simple sample of a few files that can be used with the Snowflake Git Integration
Python
1
star
80

functions-csharp-resourcetag-audit

Example from Ignite 2018 of checking and comparing resource tags stored in a CosmosDB master
C#
1
star
81

docker-jekyll-dev

Docker to develop jekyll website using gulp and browser-sync
Shell
1
star
82

functions-java-storage-eventhub-batch

Trigger on storage event, parse JSON, and send a batch to Event Hubs
Java
1
star
83

dapr-functions-playground

C#
1
star
84

serverless-shop

HTML
1
star
85

grpc-sample-go

Go application of a gRPC client and server, built for Azure Container Apps
Go
1
star
86

functions-java-storage-cognitive-cosmosDb

Java Azure function that analyzes an image with the Java cognitive SDK and outputs a summary to CosmosDB
Java
1
star
87

aca-aspnet-sample

Simple Azure Container App with an ASP.NET Core template
HTML
1
star
88

functions-java-eventhub-to-cosmosdb

Sample Java Function that reads events from event hub and creates CosmosDB documents
Java
1
star
89

logicapps-deployments

1
star
90

hollan-io-functions

Azure Functions that power the serverless hollan.io website
TypeScript
1
star
91

excel-analysis-demo

Function app that can modify an Excel document that is passed into an Azure Function
C#
1
star
92

grpc-sample-node

Node application of a gRPC client and server, built for Azure Container Apps
JavaScript
1
star
93

container-apps-learning

Plans and overview of content around Azure Container Apps
Go
1
star