# upxill/azure-kong-ai-gateway-iac architecture

> Architecture diagram of the GitHub repository upxill/azure-kong-ai-gateway-iac, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/upxill/azure-kong-ai-gateway-iac
- Repository: https://github.com/upxill/azure-kong-ai-gateway-iac

## Overview

This repository provisions an Azure-hosted Kong hybrid data plane and declares the gateway configuration that Konnect distributes to it. The main user-to-result workflows are deploying the infrastructure with Terraform, syncing environment-templated gateway configuration with decK, and proxying client requests while exporting telemetry. The README documents these relationships; source excerpts were not provided, so edges rely on README evidence and implementation details are kept at the documented level.

Main entry points: [`kong-config/base`](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base) (Gateway declarations), [`main.tf`](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf) (Terraform deployment), [`kong-helm-values.tf`](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/kong-helm-values.tf) (Kong data plane), [`kong-config/base/plugins`](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins) (Plugin execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_infrastructure["Azure infrastructure"]
  node_terraform["Terraform deployment<br/>[main.tf]"]
  node_aks["AKS cluster<br/>[main.tf]"]
  node_kong_dp["Kong data plane"]
  node_datadog_agent_deploy["Datadog Agent deployment<br/>[main.tf]"]
  node_state_backend[("Terraform state backend<br/>[backend.tf]")]
end

subgraph group_gateway_config["Gateway configuration"]
  node_deck["decK CLI"]
  node_gateway_yaml["Gateway declarations"]
  node_services["Gateway Services"]
  node_routes["Gateway Routes"]
  node_plugins["Gateway Plugins"]
  node_consumers["Gateway Consumers<br/>[consumers.yaml]"]
  node_environments["Environment templates"]
end

subgraph group_traffic["Request processing"]
  node_konnect["Kong Konnect"]
  node_route_match["Route matching"]
  node_plugin_execution["Plugin execution"]
  node_service_proxy["Service proxy"]
  node_upstream["Backend upstream"]
end

subgraph group_observability["Observability"]
  node_telemetry["Telemetry export"]
  node_datadog_agent["Datadog Agent<br/>[main.tf]"]
  node_datadog["Datadog SaaS"]
end

node_operator(("Platform operator"))
node_client(("API client"))

node_operator -->|"runs deployment"| node_terraform
node_terraform -->|"provisions cluster"| node_aks
node_terraform -->|"deploys data plane"| node_kong_dp
node_terraform -->|"deploys agent"| node_datadog_agent_deploy
node_operator -->|"runs sync"| node_deck
node_gateway_yaml -->|"defines"| node_services
node_gateway_yaml -->|"defines"| node_routes
node_gateway_yaml -->|"defines"| node_plugins
node_gateway_yaml -->|"defines"| node_consumers
node_environments -->|"templates"| node_gateway_yaml
node_deck -->|"syncs config"| node_konnect
node_konnect -->|"pushes config"| node_kong_dp
node_client -->|"sends request"| node_kong_dp
node_kong_dp -->|"matches route"| node_route_match
node_route_match -->|"runs plugins"| node_plugin_execution
node_plugin_execution -->|"continues proxying"| node_service_proxy
node_service_proxy -->|"proxies request"| node_upstream
node_plugin_execution -->|"exports signals"| node_telemetry
node_telemetry -->|"sends telemetry"| node_datadog_agent
node_datadog_agent -->|"forwards telemetry"| node_datadog

click node_terraform "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf"
click node_aks "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf"
click node_kong_dp "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/kong-helm-values.tf"
click node_datadog_agent_deploy "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf"
click node_state_backend "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/backend.tf"
click node_gateway_yaml "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base"
click node_services "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/services"
click node_routes "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/routes"
click node_plugins "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins"
click node_consumers "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/kong-config/base/consumers.yaml"
click node_environments "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/environments"
click node_route_match "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/routes"
click node_plugin_execution "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins"
click node_service_proxy "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/services"
click node_telemetry "https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins"
click node_datadog_agent "https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_terraform,node_aks,node_kong_dp,node_datadog_agent_deploy,node_state_backend,node_client toneBlue
class node_deck,node_gateway_yaml,node_services,node_routes,node_plugins,node_consumers,node_environments toneAmber
class node_konnect,node_route_match,node_plugin_execution,node_service_proxy,node_upstream toneMint
class node_telemetry,node_datadog_agent,node_datadog toneRose
class node_operator toneIndigo
```

## Components

### Azure infrastructure

- [Terraform deployment](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf): `main.tf`
- [AKS cluster](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf): `main.tf`
- [Kong data plane](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/kong-helm-values.tf): `kong-helm-values.tf`
- [Datadog Agent deployment](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf): `main.tf`
- [Terraform state backend](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/backend.tf): `backend.tf`

### Gateway configuration

- **decK CLI**
- [Gateway declarations](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base): `kong-config/base`
- [Gateway Services](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/services): `kong-config/base/services`
- [Gateway Routes](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/routes): `kong-config/base/routes`
- [Gateway Plugins](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins): `kong-config/base/plugins`
- [Gateway Consumers](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/kong-config/base/consumers.yaml): `kong-config/base/consumers.yaml`
- [Environment templates](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/environments): `kong-config/environments`

### Request processing

- **Kong Konnect**
- [Route matching](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/routes): `kong-config/base/routes`
- [Plugin execution](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins): `kong-config/base/plugins`
- [Service proxy](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/services): `kong-config/base/services`
- **Backend upstream**

### Observability

- [Telemetry export](https://github.com/upxill/azure-kong-ai-gateway-iac/tree/main/kong-config/base/plugins): `kong-config/base/plugins`
- [Datadog Agent](https://github.com/upxill/azure-kong-ai-gateway-iac/blob/main/main.tf): `main.tf`
- **Datadog SaaS**

### Other components

- **Platform operator**
- **API client**

## Connections

- Platform operator → Terraform deployment: runs deployment (evidence: `README.md`)
- Terraform deployment → AKS cluster: provisions cluster (evidence: `README.md`)
- Terraform deployment → Kong data plane: deploys data plane (evidence: `README.md`)
- Terraform deployment → Datadog Agent deployment: deploys agent (evidence: `README.md`)
- Platform operator → decK CLI: runs sync (evidence: `README.md`)
- Gateway declarations → Gateway Services: defines (evidence: `README.md`)
- Gateway declarations → Gateway Routes: defines (evidence: `README.md`)
- Gateway declarations → Gateway Plugins: defines (evidence: `README.md`)
- Gateway declarations → Gateway Consumers: defines (evidence: `README.md`)
- Environment templates → Gateway declarations: templates (evidence: `README.md`)
- decK CLI → Kong Konnect: syncs config (evidence: `README.md`)
- Kong Konnect → Kong data plane: pushes config (evidence: `README.md`)
- API client → Kong data plane: sends request (evidence: `README.md`)
- Kong data plane → Route matching: matches route (evidence: `README.md`)
- Route matching → Plugin execution: runs plugins (evidence: `README.md`)
- Plugin execution → Service proxy: continues proxying (evidence: `README.md`)
- Service proxy → Backend upstream: proxies request (evidence: `README.md`)
- Plugin execution → Telemetry export: exports signals (evidence: `README.md`)
- Telemetry export → Datadog Agent: sends telemetry (evidence: `README.md`)
- Datadog Agent → Datadog SaaS: forwards telemetry (evidence: `README.md`)
