Skip to content

Instantly share code, notes, and snippets.

View fgauna12's full-sized avatar

Facundo Gauna fgauna12

View GitHub Profile
@fgauna12
fgauna12 / Find-ReplaceToken.ps1
Created February 16, 2022 19:35
Finds all tokens in a string when surrounded by curly brackets. Values are substituted from environment variables. Perfect for CI/CD pipelines.
<#
.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 March 12, 2023 01:50
Create vanilla AKS cluster with Azure CNI and Virtual Network
#!/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 January 29, 2020 22:36
App Service ARM Template with a sub site (nested application)
{
"$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": [],