GithubHelp home page GithubHelp logo

pkarda / logicapptemplatecreator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeffhollan/logicapptemplatecreator

0.0 0.0 0.0 884 KB

Script to convert Logic Apps into templates for deployment

License: MIT License

C# 92.73% PowerShell 7.27%

logicapptemplatecreator's Introduction

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

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

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

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 liks 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

logicapptemplatecreator's People

Contributors

mlogdberg avatar jeffhollan avatar splaxi avatar wsilveiranz avatar bhoang avatar lfalck avatar svenskfisk avatar bejo73 avatar joeyeng avatar rodrigogroener avatar tomkerkhove avatar bhoang-ipl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.