# rohitti12/ciscoise-terraform-automation-azure-functions architecture

> Architecture diagram of the GitHub repository rohitti12/ciscoise-terraform-automation-azure-functions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohitti12/ciscoise-terraform-automation-azure-functions
- Repository: https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions

## Overview

##### Project type and purpose
- This is an Azure Functions project written in Python, aimed at automating configuration of Cisco ISE (Identity Services Engine) nodes in an Azure environment.
- It consists of two distinct serverless functions:
- A Timer‐triggered function that polls the ISE primary node and initiates syncing.
- An HTTP‐triggered function that reads configuration parameters from Azure App Configuration and applies them to ISE nodes.

##### File structure
- Top‐level function folders:
- HttpTrigger1/ – contains __init__.py, function.json, and sample.dat for the HTTP entry point.
- TimerTrigger1/ – contains __init__.py, function.json, readme.md, and sample.dat for the timer entry point.
- Global configs:
- host.json – Azure Functions host configuration
- requirements.txt – Python dependencies
- Metadata:
- .funcignore, .gitignore, CODEOWNERS, LICENSE, .github/ISSUE_TEMPLATE – project governance and CI/CD templates

##### Key points from the README
- Timer function: polls ISE primary, on healthy status triggers the HTTP function, checks sync.
- HTTP function: retrieves key/value pairs from Azure AppConfig and executes the main configuration routine for Primary, Secondary, and PSN nodes.

##### Main components
a. Azure Functions Host – the serverless runtime
b. TimerTrigger1 Function – scheduled execution (CRON)
c. HttpTrigger1 Function – REST endpoint or function‐to‐function call
d. Azure App Configuration Service – holds keys & values
e. Cisco ISE Nodes (Primary, Secondary, PSN) – target systems to configure
f. (Optional) Azure Storage or Logging – if used for monitoring or state

##### Architectural patterns and principles
- Serverless micro‐functions: each function has a single responsibility.
- Configuration as code: store all parameters in Azure AppConfig.
- Event‐driven orchestration: timer event drives the workflow, HTTP invocation chains tasks.
- Idempotent operations: ensure repeated runs don’t cause unintended side effects on ISE nodes.

##### Relevant technologies, frameworks, and libraries
- Azure Functions Python runtime
- Azure Functions SDK (function.json triggers/bindings)
- requests or azure‐identity (in requirements.txt) for REST calls
- Azure App Configuration client library

##### Final advice
- Be explicit about each function’s trigger type and binding.
- Sequence: Timer → HTTP → Config fetch → ISE calls.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Azure Functions Host"
        FunctionsHost["Azure Functions Host"]:::host
    end

    subgraph "Serverless Functions"
        TimerTrigger1["TimerTrigger1\n(Timer trigger)"]:::func
        HttpTrigger1["HttpTrigger1\n(HTTP trigger)"]:::func
    end

    subgraph "External Services"
        AzureAppConfig["Azure App Configuration"]:::config
        ISEPrimary["ISE Primary"]:::ise
        ISESecondary["ISE Secondary"]:::ise
        ISEPSN["ISE PSN"]:::ise
    end

    subgraph "Project Artifacts"
        Dependencies["Python Dependencies"]:::artifact
        Documentation["Project Documentation & Governance"]:::artifact
    end

    FunctionsHost -->|Schedule Trigger| TimerTrigger1
    TimerTrigger1 -->|Invoke HTTP Function| HttpTrigger1
    TimerTrigger1 -->|Health Check| ISEPrimary
    HttpTrigger1 -->|Get Config| AzureAppConfig
    HttpTrigger1 -->|Configure| ISEPrimary
    HttpTrigger1 -->|Configure| ISESecondary
    HttpTrigger1 -->|Configure| ISEPSN

    click FunctionsHost "https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions/blob/main/host.json"
    click TimerTrigger1 "https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions/blob/main/TimerTrigger1/__init__.py"
    click HttpTrigger1 "https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions/blob/main/HttpTrigger1/__init__.py"
    click Dependencies "https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions/blob/main/requirements.txt"
    click Documentation "https://github.com/rohitti12/ciscoise-terraform-automation-azure-functions/blob/main/README.md"

    classDef host fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef func fill:#D0E8FF,stroke:#1f78b4,color:#1f78b4
    classDef config fill:#C6E0B4,stroke:#238823,color:#238823
    classDef ise fill:#F2F2F2,stroke:#666666,color:#333333
    classDef artifact fill:#FFF2CC,stroke:#b58900,color:#b58900
```
