spboyer / azdev-functions-deployment

Uses ARM Template and Azure CLI 2.0 to create and Azure Function linked to GitHub repository for CI/CD deployments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy Azure Function linked to GitHub Repo

Docs

Example parameters

 {
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {
      "appName": {
          "value": "myappname"
      },
      "storageAccountName": {
          "value": "myStorage"
      },
      "storageAccountType": {
          "value": "Standard_LRS"
      },
      "repoURL": {
          "value": "https://github.com/spboyer/azdev-superhero-api.git"
      },
      "branch": {
          "value": "master"
      },
      "location": {
          "value": "East US"
      }
   }
 }

Deploy using parameters file

az group create --name MyResourceGroup --location "East US"

az group deployment create --name MyDeployment --resource-group MyResourceGroup --template-file azuredeploy.json --parameters @parameters.json

Deploy using command line parameters

az group create --name MyResourceGroup --location "East US"

az group deployment create --name MyDeployment --resource-group MyResourceGroup --template-file azuredeploy.json \
     --parameters '{"appName":{"value":"myfunckytestdeploy"},"storageAccountName":{"value":"myStorageName"},"storageAccountType":{"value":"Standard_LRS"},"repoURL":{"value":"https://github.com/spboyer/azdev-superhero-api.git"},"branch":{"value":"master"},"location":{"value":"East US"}}'

tattoocoder.com  ·  GitHub @spboyer  ·  Twitter @spboyer

About

Uses ARM Template and Azure CLI 2.0 to create and Azure Function linked to GitHub repository for CI/CD deployments