Coder Social home page Coder Social logo

gsacavdm / gov-arm-functions Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 9 KB

An Azure Resource Manager template to setup several Azure Functions in Azure Government.

License: MIT License

JavaScript 45.78% C# 54.22%
azure-government azure azure-functions azure-resource-manager azure-templates

gov-arm-functions's Introduction

Azure Functions Resource Manager Template

This template sets up an Azure Function using the code in this same repo. It pull everything in this repo (including README.MD and template.json) but Azure Functions, given the appSettings in the template, will only look at root level folders that contain a function.json file.

Note: You can export all the code in an existing Azure Function setup using the Download app content button. This template was tested using Site Content and leaving unchecked Include app settings in the download.

Naming Convention

This template only has 1 parameter: namingPrefix. This parameter is used to autogenerate the names of all resources. For example, for namingPrefix of contoso_, the site will be named contoso-site and the storage account contososa.

Assumptions

All resources are created in the same location as the resource group they are contained i

Instructions

  1. Create the resource group

    az group create -n contoso -l usgovvirginia
  2. Deploy the template to the newly created group

    az group deployment create -g contoso -n $(date +%Y%m%d_%H%M%S) --template-file template.json
  3. If you use your own GitHub repo and make changes to it after deploying the template, you can trigger a sync using the Azure CLI:

    az webapp deployment source sync -g contoso-func -n contoso-site

Outstanding Items

  • Add hostNameSslStates.thumbprint
  • Document isManualIntegration(see link)
  • Document Project appSetting
    {
      "name": "Project",
      "value": "src"
    },
  • Decide on Blob connection string (EndpointSuffix vs BlobEndpoint)
      "value": "[concat('DefaultEndpointsProtocol=https;BlobEndpoint=', reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob,';AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').keys[0].value)]"
      "value": "[concat('DefaultEndpointsProtocol=https;EndpointSuffix=', replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), '2016-01-01').primaryEndpoints.blob, concat('https://', variables('storageAccountName'), '.blob.'),''),'/',''),';AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName')),'2016-01-01').keys[0].value)]"
  • Add notes on how to use REST API (update app settings in particular)
  • Add the other Website SKUs
  • Add note that consumption-based functions aren't available in Gov yet.

References

https://docs.microsoft.com/azure/azure-functions/functions-infrastructure-as-code https://docs.microsoft.com/rest/api/appservice/webapps/updateapplicationsettings#Request_Body

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.