Skip to content

Allows you to use your private GitHub repo for Azure Linked ARM templates.

Notifications You must be signed in to change notification settings

AdamPaternostro/GitHub-Azure-Function-Proxy-for-ARM-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub-Azure-Function-Proxy-for-ARM-Template

ARM templates expect a public URL to download your templates. This allows you to use your private GitHub repo for Azure Linked ARM templates. The Azure Function is basically a proxy to GitHub. You can edit the Azure Function for your source control provider of choice.

Create the Azure Function

  1. Create an Azure Function of type .NET named {Organization}GitHubProxy (the function name needs to be globally unique)
  2. Paste the Azure-Function.cs into a new function
  3. Login into GitHub
    • Click on your name (top right)
    • Select Settings
    • Go to Developer Settings
    • Go to Personal Access Token
    • Click Generate New Token
    • Give it name
    • Select repo scope access
  4. Paste your Personal Access Token into the Azure Function
    • string personalAcccessToken = "{REMOVED}";

To call the Azuze Function

To Run via command line (Linux)

  • You need to change the URL in the azuredeploy.json
# Login
az login

# Select Subscription
az account set -s REPLACE_ME

# Script parameters
resourceGroup="Azure-Function-Proxy"
location="eastus"
today=`date +%Y-%m-%d-%H-%M-%S`
deploymentName="MyDeployment-$today"

# Create resource group
az group create \
  --name        $resourceGroup \
  --location    $location

# Deploy the ARM template
az group deployment create \
  --name                 $deploymentName \
  --resource-group       $resourceGroup \
  --template-file        azuredeploy.json

# Clean up resource group
az group delete --name $resourceGroup

About

Allows you to use your private GitHub repo for Azure Linked ARM templates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages