Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow to ARM template #138

Open
atroiano-glue opened this issue May 22, 2023 · 0 comments
Open

Workflow to ARM template #138

atroiano-glue opened this issue May 22, 2023 · 0 comments

Comments

@atroiano-glue
Copy link

atroiano-glue commented May 22, 2023

Hi,

I'm currently trying to convert a workflow.json (simple code view from Consumption Logic App) to a template.json file.
The reason why I'm doing this is to bypass the authentication step within Azure DevOps when acquiring the token and running Get-LogicAppTemplate.
For this reason, I'm using the following code:

`trigger:

  • none

pool:
vmImage: windows-latest

steps:

  • task: AzurePowerShell@5
    inputs:
    azureSubscription: 'servcon'
    ScriptType: 'InlineScript'
    Inline: |
    $logicapp = Get-AzLogicApp -ResourceGroupName "rg-NAME" -Name "logic-NAME"
    $logicapp.Definition.ToString() > $env:BUILD_ARTIFACTSTAGINGDIRECTORY/workflow.json
    Install-Module LogicAppTemplate -Force
    Import-Module LogicAppTemplate
    Get-ParameterTemplate -TemplateFile $env:BUILD_ARTIFACTSTAGINGDIRECTORY/workflow.json > $env:BUILD_ARTIFACTSTAGINGDIRECTORY/parameters.json
    azurePowerShellVersion: 'LatestVersion'`

This is working correctly, however I'm wandering whether I could use also the Get-LogicAppTemplate command in your module to convert the workflow object into template.json.

Is it possible?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant