🔏
Azure Serverless Quickstart
  • Introduction
  • Initial Setup
    • Workstation Installs
    • Codebase
      • Directory Structure
      • User Interface Project
        • Configuring StoryBook
        • Configure Tailwind
        • Configure Craco
        • -Architectural Decision Log
      • Data Access Project
        • DDD
      • Untitled
      • Full Stack Debugging
      • Creating GitHub Project
    • Infrastructure
      • Configure Session Behavior
      • Create AAD Tenant
      • Resource Group
      • Create AAD B2C Instance
        • Identity Experience Framework
        • Configure Session Behavior
      • Storage Account & CDN
        • CDN Rules
        • Configure Azure BLOB Storage
      • App Insights
        • Create AppInsight Account
        • Apollo GraphQL App Insights Configuration
      • CosmosDB
      • Twilio SendGrid
      • KeyVault
      • Function
      • Function App Settings
      • Front Door
      • DevOps
      • Optional Items
        • Azure Data Factory
      • Azure Event Hub
    • CICD and Source Control
      • Azure DevOps
      • SonarCloud
        • Incorporate into Yaml
      • Chromatic
      • User Interface YAML
      • CICD for Data Access
        • Create Pipeline
        • Data Access YAML
  • Application Structure
    • Connect Apollo
      • Apollo Overview
      • Create Apollo Component
    • MongoDB Integration
      • Mappings
      • Directory Structure
      • Apollo Connection
      • Models
      • Queries Mutations and Subscriptions
      • Caching Reponses
    • Integrating GraphQL Tools
      • GraphQL Code Generator
    • Feature Flags
      • Flag Structure & Storage
      • Website Integration
      • Apollo Integration
      • Tips and Techniques
      • Alternative Approaches
    • React Router
    • Adding Authentication
      • Create AAD Applications
      • Configure AAD For External Identities
      • Adding MSAL And React
      • Add MSAL to the build
      • Add MSAL to ApolloClient
      • Add MSAL to ApolloServer
    • Ant Design
    • Jest Tests
  • Azure Active Directory Business-to-Consumer (AD B2C)
    • Introduction
    • How to navigate through AD B2C documentation
    • Localization
    • Abbreviations
    • Azure AD B2C Extension
  • Cognitive Search
  • Cost Analysis
  • Technical Architecture
    • Identity and Access Control
  • Adding Functionality
    • Google Analytics
      • Create Analytics
    • DAPR
      • DAPR setup
      • DAPR Services (ignore for now)
        • Identity
  • Patterns and Practices
    • Idempotent Messages
    • Pathways
    • DDD
      • Initial Setup
        • Aggregate Root
        • Entity
        • Value Object
      • Field Types
        • Primitive Types
        • Non-Primitive Types
          • Types.DocumentArray
          • PopulatedDoc
          • Custom Types
      • Example Walkthrough
  • Open Items
    • Issue Tracking
  • Helpful Resources
  • DDD
    • Page 1
  • Experimental
    • StaticWebApp
    • Azure Maps
Powered by GitBook
On this page
  • Azure Configuration
  • Local Configuration

Was this helpful?

  1. Initial Setup
  2. Infrastructure

Function App Settings

(~5 minutes)

Azure Configuration

  • Navigate to the East US2 ShareThrift function app (data-access)

  • In the left menu, under settings, choose configuration

    • Create the following App Settings:

      • COSMOSDB_HOST: (from CosmosDB > Settings > Connection String > HOST (e.g.: sharethrift.mongo.cosmos.azure.com)

      • COSMOSDB_PORT: (from CosmosDB > Settings > Connection String > PORT (e.g.: 10255)

      • COSMOSDB_USER : (from CosmosDB > Settings > Connection String > USERNAME (e.g. sharethrift)

      • COSMOSDB_DBNAME: sharethrift

      • COSMOSDB_POOL_SIZE: 10

      • SENDGRID_EMAIL_FROM: <<the verified email you set up with sendgrid>>

    • Choose Save

    • Choose Continue, wait for the save to complete.

    • Next create Key Vault secured App Settings:

      • First go to Key Vault and get the access string for each of the two secrets created earlier:

      • KeyVault > sharethrift > secrets > COSMOSDB-PASSWORD

        • Copy the Secret Identifier, paste into excel

      • KeyVault > sharethrift > secrets > SENDGRID-API-KEY

        • Copy the Secret Identifier, paste into excel

      • Create a new concatenated string by wrapping following around each secret

        • @Microsoft.KeyVault(SecretUri=

        • <<Secret Identifer>>

        • )

      • Use the concatenated strings for the App Settings of:

        • COSMOSDB_PASSWORD

        • SENDGRID_API_KEY

      • Choose Save

  • Repeat the Same for the US West 2 Function data-access-west

Local Configuration

Update the local settings as well:

/azure-quickstart/data-access/local.settings.json
{
  ...
  "Values": [
    {
    ...
		"COSMOSDB_DBNAME": "sharethrift",
		"COSMOSDB_HOST": "<<SAME AS FROM ABOVE>>",
		"COSMOSDB_PORT": 10255,
    "COSMOSDB_POOL_SIZE" : 10, 
    "COSMODDB_USER": "<<SAME AS FROM ABOVE>>",
		"COSMOSDB_PASSWORD": "<<SAME AS FROM ABOVE>>",
    
    "SENDGRID_API_KEY": "<<SAME AS FROM ABOVE>>"
    "SENDGRID_EMAIL_FROM": "<<SAME AS FROM ABOVE>>"   
    ...
    }
  ]
  ...
}

PreviousFunctionNextFront Door

Last updated 4 years ago

Was this helpful?