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_OutlookSync_name": { | |
"defaultValue": "OutlookSync", | |
"type": "String" | |
}, | |
"connections_googlecalendar_externalid": { | |
"defaultValue": "/subscriptions/yoursub/resourceGroups/yourrg/providers/Microsoft.Web/connections/googlecalendar", |
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
$name = 'put-your-logicapp-name-here' | |
$resourcegroup = 'put-resource-group-here' | |
$subscription = {this_is_your_subscription_guid} | |
armclient token $subscription | | |
Get-LogicAppTemplate ` | |
-LogicApp $name ` | |
-ResourceGroup $resourcegroup ` | |
-SubscriptionId $subscription ` | |
-Verbose | Out-File C:\Temp\$name.json |
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
#!/bin/bash | |
LATEST_RELEASE=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version) | |
CURRENT_RELEASE=$(terraform version -json | jq -r .terraform_version) | |
if [[ ${LATEST_RELEASE} != $CURRENT_RELEASE ]]; then | |
echo "Installing Terraform ${LATEST_RELEASE}..." | |
FILENAME=terraform_${LATEST_RELEASE}_linux_amd64.zip | |
wget https://releases.hashicorp.com/terraform/${LATEST_RELEASE}/$FILENAME | |
unzip $FILENAME && rm $FILENAME |
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
#!/bin/bash | |
echo "Starting..." | |
# Get all VM usage as json | |
vmjson=$(az vm list-usage --location westeurope -o json) | |
# Loop through all items and check whether limit has been reached | |
# If so, log to DevOps logger so pipeline will reflect warnings or errors | |
jq -c '.[]' <<< "$vmjson" | while read i; do |
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
### | |
# Example Azure DevOps pipeline accompanying blogpost: https://peterrombouts.nl/2021/05/13/static-code-analysis-of-infrastructure-as-code/ | |
# Tested up until Kics.io version 1.4.9 | |
### | |
trigger: | |
- none | |
pool: | |
vmImage: 'ubuntu-20.04' |
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
[ | |
{ | |
"id": "cdd3427b60e26088", | |
"type": "tab", | |
"label": "Temp to LogicApp", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ |
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
{ | |
"definition": { | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"actions": { | |
"Condition": { | |
"actions": { | |
"Send_an_email_(V2)": { | |
"inputs": { | |
"body": { | |
"Body": "<p>Warning: RaspberryPi Temperature reached @{variables('Temperature')}</p>", |
OlderNewer