Production architecture case narrative

Cloud Governance, Monitoring and Infrastructure Management with Azure and Ansible

A production-oriented Azure operating model combining policy-based governance, centralized monitoring, and Ansible configuration management for consistent cloud and hybrid operations.

Cloud Foundation Platform Engineering

Scenario context

This technical case narrative describes a production-oriented design. It does not verify that a client engagement was completed or that project-specific results were achieved.

Starting conditions

The source describes governance, monitoring and host-configuration conditions the proposed operating model is intended to address. It does not provide a verified baseline from a deployed client environment.

Executive Summary

Contoso business context: Contoso operates Azure subscriptions and a hybrid fleet of Linux and Windows hosts. Governance assignments, resource diagnostics and host configuration have developed unevenly across teams, making operational control and audit evidence difficult to consolidate.

As Azure estates grow, governance and operations can fragment across subscriptions, teams, and hybrid systems. Policies may be applied unevenly, monitoring coverage can vary by workload, and server configuration may depend on manual steps or engineer-specific scripts.

This case study details Tongtech’s proposed production operating model for Contoso, integrating Azure-native resource governance and observability with Ansible-driven host configuration management.

The objective is to make cloud operations repeatable and observable while keeping control ownership clear. Governance defines the allowed boundaries, automation applies approved configuration, and operations teams retain review and change control over production remediation.

Client naming: Contoso is a generic name used to protect business identity. The architecture and implementation details below form a realistic production delivery design; customer-specific deployment evidence and measured results are not included.

The Challenge

Organizations operating a mix of cloud and hybrid infrastructure may encounter:

  • Subscription structure, ownership, tags, and access patterns that differ between teams.
  • Security and configuration expectations enforced through manual review rather than consistent controls.
  • Incomplete diagnostic settings and inconsistent alert coverage.
  • Operating-system configuration that varies between environments or drifts after deployment.
  • Repeated manual work for packages, services, agents, patching, and application prerequisites.
  • Limited evidence of what changed, when it changed, and which automation applied it.
  • Unclear boundaries between infrastructure provisioning, host configuration, and incident remediation.
  • Credentials and privileged access that are difficult to rotate or scope consistently.

The organization needs a control model that works across subscriptions and supported hybrid hosts without turning every operational change into an unreviewed automatic action.

Objectives

The target operating model is designed to:

  1. Apply consistent Azure governance across management groups and subscriptions.
  2. Centralize platform and workload telemetry with clear alert ownership.
  3. Define a repeatable configuration baseline for supported Linux and Windows hosts.
  4. Separate infrastructure provisioning from operating-system configuration and monitoring.
  5. Track configuration changes, policy findings, exceptions, and remediation decisions.
  6. Protect automation credentials and use least-privilege access.
  7. Establish controlled patching, drift review, and incident runbooks for cloud and hybrid systems.

Governance Baseline

Governance begins with clear ownership boundaries. Management groups and subscriptions reflect platform and workload responsibilities, while RBAC roles grant the access needed for each operating duty. Policy assignments are organized to make inheritance and exceptions understandable.

Azure Policy can audit or enforce baseline requirements according to their readiness and impact. Representative controls include:

  • permitted regions and approved service configurations
  • required ownership, environment, and cost-allocation tags
  • diagnostic settings for in-scope resources
  • restrictions or review requirements for public network access
  • encryption and secure transport requirements
  • approved resource types and SKUs where justified
  • security recommendations and regulatory posture visibility

Controls that could interrupt existing workloads are first assessed in audit mode or against a representative scope. Exceptions have an owner, reason, and review date. Resource locks are applied selectively to protect critical resources while preserving an approved change path.

Centralized Monitoring

Azure Monitor and Log Analytics provide a shared destination for platform activity, resource diagnostics, and operational signals. Activity Logs, Service Health, resource metrics, and workload logs are routed according to the monitoring design and retention requirements.

Dashboards and workbooks help platform and workload owners view service health, policy posture, security findings, and operational trends. Alert rules are tied to actionable conditions, named responders, and runbooks. Microsoft Defender for Cloud contributes security posture and workload findings where enabled and applicable.

Monitoring is designed with ownership and signal quality in mind: teams identify who receives each alert, what response is expected, and how alert effectiveness will be reviewed. Logs and metrics provide operational evidence; they do not replace access control or policy enforcement.

Configuration Management with Ansible

Ansible applies reviewed configuration to supported hosts. Playbooks and roles can manage operating-system settings, required packages, services, security baselines, monitoring agents, application prerequisites, and approved patch workflows. Inventory is generated or synchronized from authoritative environment data so that host membership is reviewable.

The division of responsibility is explicit:

  • Terraform or Bicep provisions and updates Azure infrastructure such as networks, virtual machines, identities, policy assignments, and monitoring resources.
  • Ansible configures the operating system and software on hosts after they exist, using versioned roles and playbooks.
  • Azure Policy and Azure Monitor evaluate resource posture and operational signals, then surface findings for the responsible team.

This separation reduces overlapping ownership. Ansible does not become an alternative mechanism for creating Azure resources, and IaC does not attempt to manage every operating-system setting through VM extensions or startup scripts.

Automation Architecture

flowchart TB IAC["Terraform or Bicep provisions Azure resources"] --> INVENTORY["Generate or synchronize inventory"] INVENTORY --> CONFIG["Ansible applies approved host configuration"] CONFIG --> MONITOR["Azure Policy and Azure Monitor report posture and health"] MONITOR --> FINDINGS["Route findings to owners for review"] FINDINGS --> CHANGE["Version, execute, and record approved changes"] CHANGE -. "updated desired state" .-> IAC
Infrastructure, configuration, and governance operations loop

The workflow uses code review, environment scoping, and execution records. Scheduled checks can identify drift and open an operational task. Automated remediation is limited to low-risk actions with explicit approval, tested rollback behavior, and clear ownership. High-impact changes such as production patching or network adjustments follow the organization’s change process.

Security and Secrets

Automation access is scoped to the hosts and Azure resources required for its task. Microsoft Entra ID and Azure RBAC provide identity and authorization boundaries for Azure operations; managed identity or federated identity is preferred when supported by the execution environment.

Secrets that remain necessary are stored in Azure Key Vault or an approved Ansible secrets mechanism such as Ansible Vault. Secret material is excluded from source control and logs, access is limited, and rotation responsibility is documented. Privileged host access is separated from routine read-only inventory and monitoring access.

Playbooks and roles receive the same review and supply-chain controls as other operational code. Changes are tested against representative hosts before broader application, and execution logs record the selected inventory, code revision, operator or automation identity, and result.

Operational Controls

Configuration drift is handled through scheduled checks and targeted review. The team distinguishes intended change from an unexpected deviation, records approved exceptions, and corrects drift through the appropriate IaC or Ansible source of truth.

Patch orchestration accounts for maintenance windows, dependency order, workload health, and recovery options. Incident runbooks describe how to investigate alerts, pause automation, restore a prior configuration, and escalate issues. Centralized logs and configuration execution history help correlate operational events without treating every detected difference as an automatic remediation request.

Implementation Sequence

1. Current-State and Ownership Assessment

Review management groups, subscriptions, policy assignments, RBAC, monitored services, host platforms, configuration scripts, access paths, operational owners, and current change controls.

2. Target Governance and Monitoring Design

Define policy scope and enforcement stages, exception handling, diagnostic routing, retention, alert ownership, and dashboards for platform and workload teams.

3. Configuration and Inventory Foundation

Establish the Ansible execution environment, inventory source, role and playbook structure, supported-host scope, credential boundaries, and code-review workflow. Identify which settings belong in IaC and which belong in host configuration.

4. Controlled Initial Rollout and Validation

Apply the baseline to a limited, representative host set. Validate idempotency, policy signals, telemetry, access boundaries, patch workflow, and rollback procedures before expanding scope.

5. Progressive Adoption

Roll out controls and configuration in manageable groups. Monitor findings, operational workload, exceptions, and service impact; refine baselines with owners before enforcing broader changes.

6. Operational Handover

Transfer role ownership, alert routing, execution procedures, runbooks, exception review, access review, and the ongoing backlog to the platform and operations teams.

Delivery Artifacts

The production delivery scope includes:

  • governance scope and ownership model
  • Azure Policy baseline and exception process
  • centralized monitoring and diagnostic-settings design
  • alert catalog, dashboards, and response runbooks
  • Ansible inventory approach, roles, and configuration playbooks
  • Terraform or Bicep patterns for platform resources
  • identity, secrets, and automation-access design
  • drift review, patching, and change-control procedures
  • rollout validation records and operational handover documentation

Contoso Production Operating Architecture

Contoso's operating estate includes Azure application subscriptions, centrally managed shared services and selected on-premises Linux/Windows systems. The architecture separates cloud resource controls (Azure Policy/RBAC), telemetry and incident response (Azure Monitor/Defender for Cloud) and guest configuration (Ansible). It also makes a clear distinction between monitoring a non-compliant setting and performing a privileged corrective change.

Control-Plane Design and Ownership

Layer Deployment boundary Owner and design rule
Management groups and subscriptions Azure Policy initiatives, RBAC, cost allocation, activity-log collection Platform governance; inherited assignments with documented exclusions
Central management subscription Log Analytics workspace(s), shared alert routing, reporting, automation state Operations/SOC; retention and data residency are explicit
Workload subscriptions Diagnostic settings, resource alerts, workload-specific dashboards Application team responds to application incidents
Hybrid host fleet Azure Arc where supported, Azure Monitor Agent and Data Collection Rules, Ansible inventory OS operations; host scope and version controlled
Configuration execution Dedicated automation workers/runners with controlled outbound access Configuration team; no broadly shared administrator account

A baseline tag set includes Application, Environment, Owner, CostCenter and DataClassification. Tag governance allows justified differences between resources and inheritance needs: not every resource type supports every tag/action in the same way. A compliance inventory lists unsupported resource types and controlled exceptions rather than reporting perfect coverage by excluding inconvenient cases.

Azure Policy Enforcement Matrix

Control Initial policy effect Enforcement approach Exception handling
Approved regions Audit for existing, deny on newly scoped resources after validation Management-group assignment Exemption with business rationale and expiry
Required tags Audit/modify according to supported resource types Remediation task with appropriate managed identity Document inherited or non-taggable cases
Diagnostic configuration DeployIfNotExists where supported Assignment identity with narrowly scoped permissions Unavailable diagnostic categories tracked
Public network exposure Audit, then deny for suitable new resources Subscriptions with verified private access patterns Time-bound legacy application exceptions
Security baseline AuditIfNotExists / Defender recommendations Risk triage; not blind remediation Risk owner approves deferred fixes

Test policy effects on representative resource types and deployment pipelines before introducing deny or modify. DeployIfNotExists and modify require appropriate role assignments on policy-assignment identities; existing resources need explicit remediation, and compliance results may be delayed after changes. Store policy definitions, initiative versions and exemptions in source control, and require owner plus expiration/review date for exceptions.

Low-Level Deployment and Operational Implementation

Monitoring Ingestion and Routing

Log collection is intentional rather than indiscriminate. Platform activity is routed through subscription-level diagnostic settings where supported; VM and Arc-connected guest telemetry uses Azure Monitor Agent with reviewed Data Collection Rules and Data Collection Rule Associations. Application logs and distributed traces use workload instrumentation or Application Insights with consistent service/environment correlation fields. Diagnostic settings for supported Azure resources are deployed from Terraform/Bicep modules or policy remediation, but collection is validated by querying the destination workspace.

A reference monitoring workflow is:

flowchart TB SOURCE["Azure resource, VM, or Arc-connected server"] --> COLLECT["Diagnostic setting or Azure Monitor Agent + DCR"] COLLECT --> LOGS["Authorized Log Analytics workspace"] COLLECT --> METRICS["Azure Monitor metrics store"] LOGS --> KQL["KQL query"] KQL --> LOGALERT["Scheduled query alert"] METRICS --> METALERT["Metric alert"] LOGALERT --> ACTION["Action Group"] METALERT --> ACTION ACTION --> INCIDENT["Incident channel or ticket integration"] INCIDENT --> OWNER["On-call owner follows linked runbook"] OWNER --> EVIDENCE["Change ticket and remediation evidence"] EVIDENCE --> TUNE["Review signals and adjust collection, queries, or thresholds"] TUNE --> COLLECT TUNE --> KQL TUNE --> METRICS
Monitoring signal collection, alerting, and incident response

Split high-volume security and application telemetry as required by access restrictions, retention policies, residency and cost. Confirm Azure Monitor Agent support and Arc connectivity for each hybrid host OS. Define data collection transformations/sampling only after establishing which records are required for incident response or compliance.

An alert catalog must specify service, severity, query or signal, evaluation interval, threshold rationale, suppression/deduplication, primary responder and runbook. Example scenarios include Azure Firewall health, unexpected public exposure, disk-space exhaustion, certificate expiration, missing heartbeats, repeated deployment failure and sustained application error rates. Each alert is tested for routing and meaningful recovery behavior; a dashboard with no responsible responder is not an operational control.

Ansible Structure, Inventory, and Access

Example
operations/
  ansible.cfg
  inventories/
    production/hosts.yml
    nonproduction/hosts.yml
  group_vars/
  playbooks/
    baseline.yml
    patch-linux.yml
    monitoring-agent.yml
  roles/
    linux-hardening/
    package-baseline/
    time-sync/
    service-monitoring/
  tests/
    inventory-checks/
  pipelines/
    validate.yml
    deploy.yml

Use inventory derived from approved CMDB/cloud tags with a reviewable snapshot; do not target broad wildcard host groups by default. A separate configuration-runner identity authenticates using short-lived mechanisms where possible. Restrict SSH/WinRM management channels to approved administration paths, scope privilege escalation to required tasks and retrieve unavoidable secrets from Key Vault or another approved secure mechanism without logging them. Pin Ansible collection and role versions; lint playbooks, run syntax checks and validate role idempotency in non-production before maintenance windows.

A production execution records repository commit, inventory snapshot, change ticket, job identity, operator/approver, output artifacts and per-host success/failure. Use batch sizes (serial), health checks and failure thresholds to avoid updating all business-critical servers together. check_mode is useful but not a universal proof that a playbook is safe; modules without full check support require testing.

Controlled Patching and Drift Remediation

  1. Collect applicable OS/package baselines and vendor support status, schedule maintenance around business service dependencies and establish pre-change backup/recovery checkpoints.
  2. Deploy baseline changes to non-production hosts, validate post-reboot services, then obtain production approval against the same pinned revision.
  3. Drain or remove selected nodes from a load-balanced pool, apply changes in batches, reboot only when required, verify service health and return healthy hosts to service.
  4. Stop the rollout when failure thresholds are reached; restore service using the host-specific recovery plan rather than assuming every package downgrade is safe.
  5. Record drift findings separately from changes, triage intentional exceptions and create source-controlled fixes for repeatable remediation.
flowchart TB BASELINE["Review baseline and dependencies"] --> APPROVAL["Approve change and maintenance window"] APPROVAL --> NONPROD["Validate pinned playbook in non-production"] NONPROD --> CANARY["Drain and patch a small host batch"] CANARY --> HEALTH["Check service health and policy state"] HEALTH --> DECISION{"Batch healthy?"} DECISION -->|"Yes"| NEXT["Continue approved batches and record results"] DECISION -->|"No"| STOP["Stop rollout and invoke host recovery plan"] STOP --> INCIDENT["Record incident and review drift separately"]
Controlled host patching and recovery

Keep the authoritative configuration source clear. Use Terraform/Bicep for VM resources, disks, network rules, managed identities and monitoring infrastructure; Ansible for supported guest packages, local settings and services; Azure Policy for allowed cloud-resource posture. Avoid competing tools writing the same setting.

Security, Recovery, and Acceptance Controls

Acceptance check Evidence expected
Governance coverage Scope inventory, policy assignment export, evaluation and exception register
Monitoring coverage DCR associations, diagnostic settings, sampled query results and alert delivery
Configuration consistency Ansible run records, role version, idempotency and exception report
Controlled access Scoped Azure RBAC, runner host privilege tests, Key Vault audit events
Production safety Batch rollout, stop conditions, restore verification and change approval
Operational handover Named incident owner, dashboards, runbooks, maintenance and review cadence

Production readiness is established by evidence from real resources and hosts, not by showing that a sample policy or playbook can execute once.

Outcome

The result is a more consistent way to govern Azure resources, observe platform health, and manage supported host configuration across cloud and hybrid environments. Teams can identify where infrastructure is out of policy, which hosts have configuration drift, and who owns the next action.

The operational outcomes above describe design capabilities; measured improvements must be substantiated by customer operating records.

Before and After Implementation: Governance and Operational Improvements

The comparison describes the baseline operating problems and the control capabilities established by the proposed design. It does not claim verified percentages or incident reductions.

Dimension Before implementation After implementation / target-state benefit
Policy coverage Different manual checks by subscription Versioned initiatives and scoped assignment inventory
Policy exceptions Informal, difficult to trace Owned, time-bound exemptions and recurring reviews
Ownership and tagging Missing or inconsistent resource metadata Audited owner/environment/cost allocation model
Diagnostics Log settings vary across services DCRs, diagnostic-as-code and validated workspace ingestion
Incident alerting Rules without consistent routing Tested action groups, runbooks and named responders
Security posture Fragmented security findings Centralized Defender/Policy triage with accountable action owners
Host configuration Engineer-specific shell scripts and manual changes Reviewed Ansible roles with inventory and execution records
Patching Ad hoc host-by-host maintenance Approved maintenance windows, batching and service checks
Configuration drift Discovered during incidents Scheduled assessment and controlled source-of-truth remediation
Privileged access Shared standing credentials Scoped runner/host identities and managed secrets
Change traceability Limited correlation of change and incident Commit, inventory, ticket, job and host-level result evidence
Recovery Inconsistent rollback assumptions Tested restoration steps and defined stop conditions

Evidence to collect: policy compliance by eligible resource class, exemption aging, monitored-resource coverage, alert false-positive rate, host baseline conformance, patch success, privileged-account inventory and mean time to acknowledge/resolve. Report baselines and observed deltas only after collecting reliable operational data.

Why This Operating Model Works

Policy establishes cloud resource guardrails.

Monitoring gives teams shared operational visibility.

IaC provisions infrastructure and Ansible configures hosts.

Review and change controls govern remediation.

Recorded automation makes operations repeatable and traceable.

The result is an operating approach that connects governance, monitoring, and configuration management while preserving clear ownership of production changes.

Technologies

Microsoft Azure · Azure Policy · Azure Monitor · Log Analytics · Microsoft Defender for Cloud · Azure Arc · Ansible · Terraform / Bicep · Azure Key Vault · Microsoft Entra ID · Azure RBAC

Next step

Discuss a similar Cloud Foundation challenge.

Share your current architecture, constraints and desired next step. Tongtech can help determine whether a focused review or implementation engagement fits.

Book an Architecture Review