Created
April 10, 2020 12:05
-
-
Save giuleon/6e76f506e3f91f8f0786c49e0afc9534 to your computer and use it in GitHub Desktop.
This is a simple ARM Template for a Logic App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"workflows_PoC_CI_CD_name": { | |
"type": "String" | |
}, | |
"connections_outlook_externalid": { | |
"type": "String" | |
}, | |
"secret": { | |
"type": "securestring", | |
"metadata": { | |
"description": "The secret stored in the Azure Key Vault" | |
} | |
} | |
}, | |
"variables": { | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Logic/workflows", | |
"apiVersion": "2017-07-01", | |
"name": "[parameters('workflows_PoC_CI_CD_name')]", | |
"location": "westeurope", | |
"properties": { | |
"state": "Enabled", | |
"definition": { | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"$connections": { | |
"defaultValue": { | |
}, | |
"type": "Object" | |
} | |
}, | |
"triggers": { | |
"manual": { | |
"type": "Request", | |
"kind": "Http", | |
"inputs": { | |
"schema": { | |
} | |
} | |
} | |
}, | |
"actions": { | |
"Initialize_variable_Secret": { | |
"runAfter": { | |
}, | |
"type": "InitializeVariable", | |
"inputs": { | |
"variables": [ | |
{ | |
"name": "Secret", | |
"type": "string", | |
"value": "[parameters('secret')]" | |
} | |
] | |
} | |
}, | |
"Send_an_email_(V2)": { | |
"runAfter": { | |
"Initialize_variable_Secret": [ | |
"Succeeded" | |
] | |
}, | |
"type": "ApiConnection", | |
"inputs": { | |
"body": { | |
"Body": "<p>this is the @{variables('Secret')}</p>", | |
"Subject": "Test", | |
"To": "delucagiuliano@gmail.com" | |
}, | |
"host": { | |
"connection": { | |
"name": "@parameters('$connections')['outlook']['connectionId']" | |
} | |
}, | |
"method": "post", | |
"path": "/v2/Mail" | |
} | |
} | |
}, | |
"outputs": { | |
} | |
}, | |
"parameters": { | |
"$connections": { | |
"value": { | |
"outlook": { | |
"connectionId": "[parameters('connections_outlook_externalid')]", | |
"connectionName": "outlook", | |
"id": "/subscriptions/3d0b8544-e3c0-42f5-bffd-7577fc2dc70e/providers/Microsoft.Web/locations/westeurope/managedApis/outlook" | |
} | |
} | |
} | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment