Skip to content

Instantly share code, notes, and snippets.

Avatar

Facundo Gauna fgauna12

View GitHub Profile
@fgauna12
fgauna12 / Find-ReplaceToken.ps1
Created Feb 16, 2022
Finds all tokens in a string when surrounded by curly brackets. Values are substituted from environment variables. Perfect for CI/CD pipelines.
View Find-ReplaceToken.ps1
<#
.SYNOPSIS
Replace tokens in a file with values from environment variables.
.DESCRIPTION
Finds tokens in a given file and replace them with values from environment variables. It is best used to replace configuration values in a release pipeline.
Tokens are found when enclosed with curly brackets. For eample: {{ foo }}
.EXAMPLE
@fgauna12
fgauna12 / create-vanilla-cluster.sh
Last active Jan 30, 2022
Create vanilla AKS cluster with Azure CNI and Virtual Network
View create-vanilla-cluster.sh
#!/bin/bash
set -ex
echo "Creating cluster with base name $1 on $2"
if [ -z "$1" ]
then
echo "Please provide the name of the cluster."
exit -1
@fgauna12
fgauna12 / arm-deploy-azure-web-app-subsite.json
Last active Jan 29, 2020
App Service ARM Template with a sub site (nested application)
View arm-deploy-azure-web-app-subsite.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2019-08-01",
"name": "[parameters('plan-name')]",
"location": "[resourceGroup().location]",
"dependsOn": [],