{"id":20697607,"url":"https://github.com/epomatti/azure-functions-serverless-prototype","last_synced_at":"2025-10-29T23:52:54.655Z","repository":{"id":108712306,"uuid":"271096876","full_name":"epomatti/azure-functions-serverless-prototype","owner":"epomatti","description":"A secure, schemeless serverless application deployed with infrastructure as code","archived":false,"fork":false,"pushed_at":"2022-03-24T21:59:51.000Z","size":393,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T18:44:25.769Z","etag":null,"topics":["azure-functions","azure-keyvault","cosmosdb","mongodb","python","serverless","servicebus","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epomatti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-09T19:56:34.000Z","updated_at":"2022-04-27T00:23:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5790f06-1276-4d7b-8051-fe44d6614c3f","html_url":"https://github.com/epomatti/azure-functions-serverless-prototype","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-functions-serverless-prototype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-functions-serverless-prototype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-functions-serverless-prototype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Fazure-functions-serverless-prototype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/azure-functions-serverless-prototype/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961747,"owners_count":20213315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-functions","azure-keyvault","cosmosdb","mongodb","python","serverless","servicebus","terraform"],"created_at":"2024-11-17T00:19:10.302Z","updated_at":"2025-10-29T23:52:54.571Z","avatar_url":"https://github.com/epomatti.png","language":"HCL","readme":"# Azure Functions - Terraform Prototype\n\n[![Azure Function App](https://github.com/epomatti/azure-functions-serverless-prototype/actions/workflows/python-app.yml/badge.svg)](https://github.com/epomatti/azure-functions-serverless-prototype/actions/workflows/python-app.yml)\n\nPutting some technologies together as a prototype for my next project.\n\n- **Serverless** - Azure Functions with a consumption plan\n- **NoSQL** - CosmosDB with a MongoDB interface\n- **Cloud security** - Azure Key Vault to encrypt and decrypt sensitive data, as well for getting secrets\n- **Infrastructure-as-code** - Terraform\n\n\u003cimg src=\".docs/solution.png\" width=350/\u003e\n\n\n## Local development\n\nCheck the infrastructure section below to create the Azure resources.\n\nRequirements:\n- Azure Functions Core Tools\n- Terraform CLI\n\nSetup:\n\n```sh\n# set the variables in this file\ncp local.settings.development.json local.settings.json\n\n# download dependencies\npython3 -m venv env\n. env/bin/activate\npip install -r requirements.txt\n```\n\nStart Functions locally:\n\n```sh\nfunc start\n```\n\nFunctions:\n\n```sh\n# Load questions\ncurl localhost:7071/api/LoadQuestions\n\n# Post answers\ncurl --data '@shared_code/answers.json' http://localhost:7071/api/PostAnswers\n\n#Get answers\ncurl http://localhost:7071/api/GetAnswers?id=participant@mail.com\n```\n\n## Infrastructure\n\n\n```sh\naz login\n\nterraform init\nterraform plan\nterraform apply -auto-approve\n```\n\n### Local Development \n\nExtra steps for local development.\n\nCreate the app registration:\n\n```sh\naz ad app create --display-name myproj888 --password '\u003cSTRONG_SECRET\u003e'\n```\n\nAdd the app credentials to `local.settings.json`.\n\nIn the Key Vault add a `Access Policy` for the app with KEY operations `Get`, `Decrypt` and `Encrypt`\n\n## Sources\n\n[Azure Functions Python developer guide](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python)\n\n[Azure KeyVault Keys - Python SDK](https://pypi.org/project/azure-keyvault-keys/)\n\n[Azure Identity - Python SDK](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-functions-serverless-prototype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Fazure-functions-serverless-prototype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Fazure-functions-serverless-prototype/lists"}